Q:

Spot The Error

0

Spot The Error

#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); } }

  1. No error and print 4 A a b c
  2. Error: unknown variable ptr
  3. No error and print A a b c
  4. Error: Lvalue required for parameter

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Correct Answer:

No error and print A a b c

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C Programming Multiple Choice Questions And Answers

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Which of the data types has the size that is varia... >>
<< Find out the Output #include int main() { int i; #...