Home » C Programming » Variables » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    register int p;
    void main()
    {
    printf("%d", p);
    }
    1. 0
    2. Garbage value
    3. Compilation error
    4. Varies
    5. None of these
Correct Option: C

Compilation error

main.c:2:18: error: register name not specified for ‘p’
register int p;



Your comments will be displayed only after manual approval.