Home » C Programming » Functions » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    #include <stdarg.h>
    int fun(char ch, ...);
    int main()
    {
    char ch1 = 100, ch2 = 101;
    fun(ch1, ch2);
    return 0;
    }
    int fun(char ch, ...)
    {
    va_list list;
    va_start(list, ch);
    char ch2 = va_arg(list, int);
    printf("%c\n", ch2);
    va_end(list);
    }
    1. 100
    2. d
    3. 101
    4. e
    5. None of these
Correct Option: D

e



Your comments will be displayed only after manual approval.