Question 1

Time: 00:00:00

How do you declare an integer pointer variable correctly? 

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

Question 2

Time: 00:00:00
What do you mean by 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

Question 3

Time: 00:00:00
Guess the output-


#include<stdio.h>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

Question 4

Time: 00:00:00
Whose pointer value is unchangeable?

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

Question 5

Time: 00:00:00
An address operator is defined as which of the following?

&(ampersand)

&(ampersand)

*(asterik)

*(asterik)

.(dot)

.(dot)

#(hash)

#(hash)

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

Please login to submit your explanation

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

Question 7

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

x = x+1

x = x+1

*x = *x

*x = *x

*x = *x +1

*x = *x +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

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

Question 9

Time: 00:00:00
Guess the output:


#include<stdio.h>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

Question 10

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

&(ampersand)

&(ampersand)

#(hash)

#(hash)

*(asterik)

*(asterik)

.(dot)

.(dot)

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

Please login to submit your explanation

["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%

Get over 200+ Courses under One Subscription

mute

Don’t settle Learn from the Best with PrepInsta Prime Subscription

Learn from Top 1%

One Subscription, For Everything

The new cool way of learning and upskilling -

Limitless Learning

One Subscription access everything

Job Assistance

Get Access to PrepInsta Prime

Top Faculty

from FAANG/IITs/TOP MNC's

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Comments

One comment on “Zoho Pointers Quiz 1”