Computer Science - Object Oriented Programming Using C++ - Discussion
Discussion Forum : Object Oriented Programming Using C++ - Section 1 (Q.No. 10)
10.
A C++ program contains a function with the header int function(double d, char c). Which of the following function headers could be used within the same program?
Discussion:
12 comments Page 2 of 2.
Ajit said:
1 decade ago
The right answer here should be (B). As the compiler differentiates the functions with same name based on.
I) No.of arguments.
II) Type of arguments.
The return type is not a taken into account in case of function overloading.
Thus (A) is ruled out.
I) No.of arguments.
II) Type of arguments.
The return type is not a taken into account in case of function overloading.
Thus (A) is ruled out.
Himanshu said:
1 decade ago
Please give a example of the same.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers