Which of the following is a valid overloaded version of the function void display(int a)?
- int display(int a);
- void display(char c);
- void display(float b);
- void display(int a, int b);
To create an overloaded version of the function void display(int a), you must have a different parameter list. In this case, void display(int a, int b); is a valid overloaded version because it takes two integer parameters instead of just one.
Loading...
Related Quiz
- What is the main difference between float and double data types?
- In binary file operations, to write data of various data types, you use the _______ function.
- What does the struct keyword allow a C++ programmer to do?
- When dynamically allocating an array of integers using new, which of the following syntax is correct?
- What is the impact of using a friend function on encapsulation in C++?