Search Header Logo

C++ pointers

Authored by Shiny Verghese

Computers

University

Used 79+ times

C++ pointers
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of these is the indirection operator?

&

>>

<<

*

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be the output of this piece of code?

13

3

Syntax error

none of the given options

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be the output of this piece of code?

15

5

8

This is too confusing

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be the output of this piece of code?

Value of constant pointer (const) cannot be changed

Variable value cannot be used to initialise the pointer

12

24

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A function may return a pointer but the programmer must ensure that the pointer

still points to a valid object after the function ends

has not been assigned an address

was received as a parameter by the function

has not previously been returned by another function

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Use the delete operator only on pointers that were

never used

not correctly initialized

created with the new operator

dereferenced inappropriately

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Dynamic memory allocation occurs

when a new variable is created by the compiler

when a new variable is created at runtime

when a pointer fails to dereference the right variable

when a pointer is assigned an incorrect address

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?

Discover more resources for Computers