Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int var = 10;
    int *p = &15;
    printf("%p\n", p);
    }
    1. 10
    2. 15
    3. Garbage value
    4. Compilation Error
    5. None of these
Correct Option: D

Compilation Error

main.c: In function ‘main’:
main.c:5:18: error: lvalue required as unary ‘&’ operand
int *p = &15;



Your comments will be displayed only after manual approval.