Home » C Programming » Variables » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int p = 200;
    int p = 17;
    printf("Hello Interview Mania! %d\n", p);
    return 0;
    }
    1. Interview Mania
    2. Hello Interview Mania!
    3. Compilation Error
    4. Runtime Error
    5. None of these
Correct Option: C

Since p is already defined, redefining it results in an error.



Your comments will be displayed only after manual approval.