Single Choice Easy

QWhat is the output of this program?

#include<stdio.h>
int main(){
    const int *p;
    int a=10;
    p=&a;
    printf("%d",*p);
    return 0;
}

ID: #899 Pointer in C Language 4,646 views
Question Info
#899Q ID
EasyDifficulty
Pointer in C LanguageTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 1
  • B Compiler Error
  • C 10
  • D Garbage value
Correct Answer

Explanation

In the following declaration


 const int *p; 

p can keep address of constant integer.

No Previous Next Question

Share This Question

Challenge a friend or share with your study group.