What is the output of the following c++ program?
void abc (int x = 0, int y = 0)
{
cout << "Hi There";
}
void abc (int x)
{
cout << "How are you doing today ? " ;
}
void main (void)
(
int m = 5;
abc (m) ;
}
A. | Hi There |
B. | How R U doing today? |
C. | What gets printed depends on how the particular compiler is implemented |
D. | It results in compilation error |
Answer : D Explanation : The call abc ( ) matches with the signatures - void abc (int x = 0, int y = 0) and void abc (int x). The compiler cannot unambiguously resolve this conflict. So it complains. |
|
Option: A Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. |