NTA UGC NET JUNE-2023 Paper-2
November 10, 2023Computer-Networks
November 10, 2023Question 1670 – Programming
Output of following program?
#include
void dynamic(int s,..)
{
printf(“%d”,s);
}
int main()
{
dynamic(2,4,6,8);
dynamic(3,6,9);
return 0;
}
Correct Answer: A
Question 210 Explanation:
● The latest compiler giving compilation error “error: expected declaration specifiers or ‘…’ before ‘.’ toke n“
● Old compiler may support that syntax, in that syntax only first argument is defined which consists of remainings arguments but not defined.
● For the function call dynamic(2,4,6,8), first argument 2 is printed.
● For the function call dynamic(3,6,9);first argument 3 is printed.
● Old compiler may support that syntax, in that syntax only first argument is defined which consists of remainings arguments but not defined.
● For the function call dynamic(2,4,6,8), first argument 2 is printed.
● For the function call dynamic(3,6,9);first argument 3 is printed.
23
compile error
43
32
Subscribe
Login
0 Comments