Please login

Prime

Prepinsta Prime

Video courses for company/skill based Preparation

(Check all courses)
Get Prime Video
Prime

Prepinsta Prime

Purchase mock tests for company/skill building

(Check all mocks)
Get Prime mock

Quiz 1

Question 1

Time: 00:00:00
What is the correct way for declaring an integer pointer variable?

int *ptr

int *ptr

int ptr

int ptr

int ptr*

int ptr*

int &ptr

int &ptr

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

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
What is a pointer?

Pointer is a keyword

Pointer is a keyword

Pointer is a variable that store address of the instruction

Pointer is a variable that store address of the instruction

Pointer is a variable that store the address of another variable

Pointer is a variable that store the address of another variable

All of the mentioned

All of the mentioned

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

Please login to submit your explanation

Start

Question 3

Time: 00:00:00

What will be the output of the following code?


int main(){

int x, *y;

y=&x;

x=10;

cout<<++(*y);

}

10

10

11

11

Compile time error

Compile time error

Run time error

Run time error

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

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
Whose pointer value cannot be modifiable?

NULL Pointer

NULL Pointer

Integer Pointer

Integer Pointer

Constant Pointer

Constant Pointer

Both a and c

Both a and c

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

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
Which of the following is known as an address operator?

&

&

*

*

.

.

#

#

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 happen after the execution of the given line:


 *p++

Increment the value pointed by p

Increment the value pointed by p

Increment the pointer

Increment the pointer

Both a and b

Both a and b

None of these

None of these

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

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
++*p is similar to ______

p = p+1

p = p+1

*p = *p

*p = *p

*p = *p +1

*p = *p +1

Both a and c

Both a and c

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 represents the valid NULL pointer?

void*

void*

*void

*void

Both a and b

Both a and b

None of the mentioned

None of the mentioned

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

Please login to submit your explanation

Start

Question 9

Time: 00:00:00

Guess the output:


void fun(int *p, int m){

m += 5;

*p += m;

}

int main(){

int i=5, j=10;

fun(&i, j);

cout<<i+j;

return 0;

}

10

10

20

20

30

30

40

40

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

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
Which of the following is an indirection operator?

&

&

#

#

*

*

.

.

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!"]

Completed

0/0

Accuracy

0%

Prime

PrepInsta Prime Video

Complete video course for Cognizant GenC Elevate

for Elevate
Get Prime Video

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%