Home » C Programming » C-Library-Functions » Question
  1. What will be the output of the following C code considering user typed ajit?
    #include <stdio.h>
    int main()
    {
    char num[26];
    fgets(num, 25, stdin);
    ungetc(num[0], stdin);
    printf("%s\n", num);
    return 0;
    }
    1. Undefined behaviour
    2. jit
    3. Compilation Error
    4. ajit
    5. None of these
Correct Option: D

ajit



Your comments will be displayed only after manual approval.