Examveda

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

A. Compile time error

B. Undefined behaviour

C. a

D. b

Answer: Option D


This Question Belongs to C Program >> File Input Output

Join The Discussion

Related Questions on File Input Output