Teaching HPSC Lecturer (Technical) Mock Test 2024 Programming and Data Structure Programming in C Pointer
Consider the following program in C language:
#include
main()
{
int i;
int *pi = &i;
scanf(ā%dā,pi);
printf(ā%d\nā, i+5);
}
Which one of the following statements is TRUE?
1
Compilation fails
2
Execution results in a run-time error.
3
On execution, the value printed is 5 more than the address of variable i.
4
On execution, the value printed is 5 more than the integer value entered.
5
Question Not Attempted