1.

Point out the error if any in the following program (Turbo C). #include #include void display(int num, ...); int main() { display(4, 'A', 'a', 'b', 'c'); return 0; } void display(int num, ...) { char c; int j; va_list ptr; va_start(ptr, num); for(j=1; j<=num; j++) { c = va_arg(ptr, char); printf("%c", c); } }

A. Error: unknown variable ptr
B. Error: Lvalue required for parameter
C. No error and print A a b c
D. No error and print 4 A a b c
Answer» D. No error and print 4 A a b c


Discussion

No Comment Found