I have a doubt.. it was question in my quiz.. Like to know the answer for this question.
Question:
int foo(int);
double foo(int);
double foo(double);
void bar(int value){
double score = foo(value);
}
which of the function declarations will be selected? or it is none of the above?
C doesn’t support overloading (functions with the same name).
If this is really a C++ question, C++ doesn’t allow overloads where only the return type is different (
int foo(int)anddouble foo(int)).