Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
     #include <stdio.h>
    int num = 0;
    void main()
    {
    int *p = #
    printf("%p\n", p);
    num++;
    printf("%p\n ", p);
    }
    1. Compilation Error
    2. Same memory address
    3. Different memory address
    4. Varies
    5. None of these
Correct Option: B

Same memory address



Your comments will be displayed only after manual approval.