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


Please Help Members By Posting Answers For Below Questions

What is static modifier?

623


What causes polymorphism?

563


Please send ford technologies placement paper 2 my mail id

1646


Why do we use oop?

594


Why do we use inheritance?

624






i got a backdoor offer in process global,Bangalore..Can i work with it?

2316


What language is oop?

589


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.

1630


What are the two different types of polymorphism?

665


Is oop better than procedural?

560


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.

1776


What is overloading in oops?

589


c++ program to swap the objects of two different classes

1752


What is oops with example?

557


What is polymorphism in oops?

551