Search Header Logo

Quiz on Pointers and Dynamic Arrays in C++

Authored by Галина Ковтонюк

Computers

University

Quiz on Pointers and Dynamic Arrays in C++
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

29 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a pointer in C++?

A variable that stores the address of another variable

A variable that stores a value

A function that returns a value

A type of array

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to obtain the address of a variable?

::

->

&

*

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the symbol '*' indicate when declaring a pointer?

It indicates a pointer

It indicates a reference

It indicates a constant

It indicates a function

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'new' operator in C++?

To initialize a variable

To delete a variable

To allocate memory dynamically

To declare a variable

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of dereferencing a pointer?

Declaring a new pointer

Getting the address of the pointer

Getting the value stored at the address

Changing the pointer's address

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of memory allocation does 'malloc' perform?

Static allocation

Dynamic allocation

Automatic allocation

Manual allocation

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to declare a pointer to an integer?

int pointer;

pointer int;

int* pointer;

*int pointer;

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?