GATE Exam | Aptitude Questions | GATE Syllabus | GATE Result | Mock Test | GATE Preparation
0 votes

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.

asked in c programming by gate

1 Answer

0 votes

(D) On execution, the value printed is 5 more than the integer value entered.

answered by gate

Related questions

The best answer to any question