Zoho Pointers Quiz 1

Question 1

Time: 00:00:00
What is (void*)0?

Representation of NULL pointer

Representation of NULL pointer

Representation of void pointer

Representation of void pointer

Error

Error

None of the above

None of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
In which header file is the NULL macro defined?

stdio.h

stdio.h

stddef.h

stddef.h

stdio.h and stddef.h

stdio.h and stddef.h

math.h

math.h

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
Which of the following gives the memory address of integer variable a ?

*a;

*a;

a;

a;

&a;

&a;

address(a);

address(a);

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
How many bytes are occupied by near, far and huge pointers (DOS)?

near=2 far=4 huge=4

near=2 far=4 huge=4

near=4 far=8 huge=8

near=4 far=8 huge=8

near=2 far=4 huge=8

near=2 far=4 huge=8

near=4 far=4 huge=8

near=4 far=4 huge=8

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
The operator used to get value at address stored in a pointer variable is

*

*

&

&

&&

&&

II

II

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
What is the output of the  following of the code ?

#include <stdio.h>
int *f();
int main()
{
int *p = f();
printf("%d\n", *p);
}
int *f()
{
int j = 10;
return &j;
}

10

10

Compile time error

Compile time error

Segmentation fault/runtime crash

Segmentation fault/runtime crash

Undefined behaviour

Undefined behaviour

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
Which of the following is the proper declaration of a pointer?

int x;

int x;

int &x;

int &x;

int *x;

int *x;

ptr x;

ptr x;

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 8

Time: 00:00:00

Which of the following statements correctly declare a function that receives a pointer to pointer to a pointer to a float and returns a pointer to a pointer to a pointer to a pointer to a float?

float **fun(float***);

float **fun(float***);

float *fun(float**);

float *fun(float**);

float fun(float***);

float fun(float***);

float fun(float***);

float fun(float***);

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
Which of the statements is correct about the program?

#include<stdio.h>
int main(){
float a=3.14;
char *j;
j = (char*)&a;
printf("%d\n", *j);
return 0;
}

It prints ASCII value of the binary number present in the first byte of a float variable a.

It prints ASCII value of the binary number present in the first byte of a float variable a.

It prints character equivalent of the binary number present in the first byte of a float variable a.

It prints character equivalent of the binary number present in the first byte of a float variable a.

It will print 3

It will print 3

It will print a garbage value

It will print a garbage value

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
What will happen in this code?

int a = 100, b = 200;
int *p = &a, *q = &b;
p = q;

b is assigned to a

b is assigned to a

p now points to b

p now points to b

a is assigned to b

a is assigned to b

q now points to a

q now points to a

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Completed

0/0

Accuracy

0%