Home » C Programming » Input & Output » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    short int num;
    scanf("%*d", &num);
    printf("%hd", num);
    return 0;
    }
    1. Whatever user types
    2. Runtime Error
    3. Garbage value
    4. Compilation Error
    5. None of these
Correct Option: C

Garbage value



Your comments will be displayed only after manual approval.