Get Started
610

Q: Point out the error, if any, in the following program. #include "stdarg.h" main() {      display ( 4, 12.5, 13.5, 14.5, 44.3); } display(int num, ...) {        float c; int j;         va_list ptr;         va_start (ptr, num);         for ( j = 1; j

  • Show Answer
  • Workspace

Answer :
Explanation :

While extracting a float argument using va_arg we should have useed  c = va_arg (ptr, double)

The Most Comprehensive Exam Preparation Platform

Get the Examsbook Prep App Today