Examveda

What will be the output of the following C code?
#include <stdio.h>
#include <stdarg.h>
int f(int c, ...);
int main()
{
    int c = 97;
    float d = 98;
    f(c, d);
    return 0;
}
int f(int c, ...)
{
    va_list li;
    va_start(li, c);
    float d = va_arg(li, float);
    printf("%f\n", d);
    va_end(li);
}

A. Compile time error

B. Undefined behaviour

C. 97.000000

D. 98.000000

Answer: Option B


This Question Belongs to C Program >> File Input Output

Join The Discussion

Related Questions on File Input Output