Home » C Programming » Input & Output » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int num;
    scanf("%d", num);
    printf("%d\n", num);
    return 0;
    }
    1. Whatever user types
    2. Compilation Error
    3. Depends on the standard
    4. Undefined behavior
    5. None of these
Correct Option: D

Undefined behavior



Your comments will be displayed only after manual approval.