A function abc is defined as
void abc(int x=0, int y, int z=0)
{
cout << x << y << z;
}
Which of the following function calls is/are illegal? (Assume h, g are declared as integers)
A. | abc () ; |
B. | abc (h) ; |
C. | abc (h, h) ; |
D. | Both (a) & (b) |
Answer : D Explanation : Since the second argument is mandatory, any call should have at least the first two parameters. Some compilers expect the optional parameters to follow the others. Such compilers give a compilation error. |
|
Option: A Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. |