C++ Pointers Quiz

C++ Pointers Quiz

1st - 5th Grade

10 Qs

quiz-placeholder

Similar activities

Mouse

Mouse

1st - 3rd Grade

12 Qs

MIDTERM IS2C ONLINE QUIZ

MIDTERM IS2C ONLINE QUIZ

1st Grade

15 Qs

UNDERSTANDING WINDOWS

UNDERSTANDING WINDOWS

3rd Grade

15 Qs

Data Types in Python

Data Types in Python

1st - 5th Grade

14 Qs

Week 2 HCI

Week 2 HCI

3rd - 5th Grade

10 Qs

Pascal Assessment

Pascal Assessment

3rd - 4th Grade

10 Qs

Python Basics

Python Basics

KG - University

15 Qs

Pointeri

Pointeri

1st Grade

14 Qs

C++ Pointers Quiz

C++ Pointers Quiz

Assessment

Quiz

Computers

1st - 5th Grade

Hard

Created by

Turyamusiima Dismas

Used 7+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?