Gate 2014 pyq C Programming | Consider following program in C language:main(){int i; int*pi = &i;

Опубликовано: 19 Июнь 2026
на канале: Gate CS pyqs - the other way [Eng]
706
21

Consider the following program in C language:

#include stdio.h
main()
{
int i;
int*pi = &i;
scanf("%d",pi);
printf("%d\n", i+5);
}
Which one of the following statements is TRUE?

(A)Compilation fails.
(B)Execution results in a run-time error.
(C)On execution, the value printed is 5 more than the address of variable i.
(D)On execution, the value printed is 5 more than the integer value entered.