Is following functions are said to be overloaded?

int add(int a,int b)

char *add(int a,int b)

Answers were Sorted based on User's Feedback



Is following functions are said to be overloaded? int add(int a,int b) char *add(int a,int b)..

Answer / arunkumar995

Function overloadig can not be achive only chaining the
return type.We must havv to change the aruments.

int add(int a,int b)
char*add(int a,int b)

one think that return type not make important role in
function overloading.In fun Overloading must effect on the
arguments.
Thus we say the given [int add(int a,int b)
char*add(int a,int b)]is not function overloaded.

Is This Answer Correct ?    6 Yes 1 No

Is following functions are said to be overloaded? int add(int a,int b) char *add(int a,int b)..

Answer / 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

Is following functions are said to be overloaded? int add(int a,int b) char *add(int a,int b)..

Answer / ajay singh

No above function is not overloaded .... function over
loading can take place if the signature of the function is
different and the signature of the function do not include
the return type

Is This Answer Correct ?    0 Yes 0 No

Is following functions are said to be overloaded? int add(int a,int b) char *add(int a,int b)..

Answer / brunda r

no.

Is This Answer Correct ?    4 Yes 6 No

Post New Answer

More OOPS Interview Questions

What does the keyword "static" mean?

4 Answers   TCS,


What type of loop is a for loop?

0 Answers  


What type of Job you are providing?

0 Answers  


Program to open a file with First argument

1 Answers   TCS,


is there any choice in opting subjects like 4 out of 7

0 Answers  






what is Class in oops with example?

4 Answers   HCL,


What are two types of polymorphism?

0 Answers  


what is a ststic variable and stiticfunction briefly explain with exmple and in which case we use

2 Answers   HCL,


The company is a fake company asking for money of RS10000 while training and not offering a job after training. My humble request to you people not to attend Astersys interview

1 Answers   Astersys,


What is polymorphism give a real life example?

0 Answers  


Why is oop better than procedural?

0 Answers  


Can enum be null?

0 Answers  


Categories