1.  What is the output of this C code ?
#include
int x = 0;
void main()
{
int *ptr = &x;
printf(‘’%p\n’’, ptr);
x++;
printf(‘’%p\n ‘’, ptr);
}


Same address
Different address
Compile time error
Varies


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

2.  What is the output of this C code ?
#include
void main(
{
int x = 0;
int *ptr = &5;
printf(‘’%p\n’’, ptr);
}


5
Address of 5
Nothing
Compile time error


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

3.  What is the output of this C code ?
#include
void main()
{
int x = 0;
int *ptr = &x;
printf(''%d\n'', *ptr);
}


Address of x
Junk value
0.
Run time error


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

4.  Which is an indirection operator among the following ?


&
*
->
.


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

5.  Which of the following does not initialize ptr to null (assuming variable declaration of a as int a = 0; ?


int *ptr = &a;
int *ptr = &a – &a;
int *ptr = a – a;
All of the mentioned


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report