Computer Science - Object Oriented Programming Using C++ - Discussion
Discussion Forum : Object Oriented Programming Using C++ - Section 1 (Q.No. 45)
45.
C++ allows you to define the same functions more than once in the same program _____
Discussion:
5 comments Page 1 of 1.
Pankaj shrimali said:
8 years ago
in function overloading, the function name is same but a number of parameter and type of parameters are different. The question is:
C++ allows you to define the same functions more than once in the same program ____
We can't use the same functions more than once
So option D is correct.
C++ allows you to define the same functions more than once in the same program ____
We can't use the same functions more than once
So option D is correct.
Subhashini said:
1 decade ago
Same function can be overloaded with different return type and no of parameters. How can we say that C++ doesn't allow to define the same function in the same program?
Monali said:
1 decade ago
C++ does not allow multiple definition, it only allows multiple declarations of the same name which is called as function overloading.
Alok Kumar said:
8 years ago
By the definition of "function overloading", Defining multiple functions with same name.
So, Option D will be not correct answer.
So, Option D will be not correct answer.
Maya said:
1 decade ago
Function overloading is defining same function more than one time. How option D is correct?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers