Is following functions are said to be overloaded?
int add(int a,int b)
char *add(int a,int b)
Answer Posted / abilask
Yes the said funtion add is overloaded.
But it is in ambiguous state because of passing element is
same.
Compiler will differ with the passing elements, but dont
consider the return value.
In this quiestion the two add funtion having two different
return type int & char * respectively.
I think the below one will be correct example for
overloaded function.
int add(int a,int b);
char *add(float a,int b);
Is This Answer Correct ? | 8 Yes | 7 No |
Post New Answer View All Answers
What is static modifier?
What causes polymorphism?
Please send ford technologies placement paper 2 my mail id
Why do we use oop?
Why do we use inheritance?
i got a backdoor offer in process global,Bangalore..Can i work with it?
What language is oop?
This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.
What are the two different types of polymorphism?
Is oop better than procedural?
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
What is overloading in oops?
c++ program to swap the objects of two different classes
What is oops with example?
What is polymorphism in oops?