Search Header Logo

C++ Pointers Quiz

Authored by Turyamusiima Dismas

Computers

1st - 5th Grade

Used 7+ times

C++ Pointers Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

The operator used for dereferencing or indirection is ____

*

&

->

->>

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Choose the right option give the code in the image on the left.

both x and y are pointers to string types

x is a pointer to a string, y is a string

y is a pointer to a string, x is a string

y is a pointer to a string

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following is illegal?

Media Image
Media Image
Media Image
Media Image

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What will happen in the following C++ code snippet?

a is assigned to b  

b is assigned to a

p now points to b

q now points to a

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What will be the output of the following C++ code?

15

5

it will return some random number

10

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following gives the [value] stored at the address pointed to by the pointer : ptr?

Value(ptr)

ptr

&ptr

*ptr

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Choose the right option for the code on the left.

x is a pointer to a string, y is a string

y is a pointer to a string, x is a string

Both x and y are pointers to string types

none of the mentioned

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?