NTA UGC NET JUNE-2023 Paper-2
November 10, 2023
Computer-Networks
November 10, 2023
NTA UGC NET JUNE-2023 Paper-2
November 10, 2023
Computer-Networks
November 10, 2023

Question 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.
A
23
B
compile error
C
43
D
32
GAURAV GUPTA
I never give up until I achieve
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!