C++ Pointers and Arrays Quiz

C++ Pointers and Arrays Quiz

12th Grade

18 Qs

quiz-placeholder

Similar activities

1TEC_AVALIAÇÃO_INTRODUÇÃO À PROGRAMAÇÃO_ 3º TRI_AV5

1TEC_AVALIAÇÃO_INTRODUÇÃO À PROGRAMAÇÃO_ 3º TRI_AV5

12th Grade - University

16 Qs

Sains Komputer Tingkatan 4 : Struktur data & Modular

Sains Komputer Tingkatan 4 : Struktur data & Modular

9th - 12th Grade

21 Qs

Final Review - Unit 1

Final Review - Unit 1

9th - 12th Grade

15 Qs

Pointers

Pointers

12th Grade

20 Qs

2D Array Test

2D Array Test

9th Grade - University

20 Qs

Computer Quiz

Computer Quiz

12th Grade - University

16 Qs

AP Computer Science College Board Test

AP Computer Science College Board Test

10th - 12th Grade

15 Qs

Computer Science AP

Computer Science AP

10th - 12th Grade

15 Qs

C++ Pointers and Arrays Quiz

C++ Pointers and Arrays Quiz

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Fidaa Abed

Used 5+ times

FREE Resource

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What operator is used to get the address of a variable in C++?

*

&

->

%

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a pointer variable store?

Value of a variable

Address of another variable

Both value and address

None of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is the address of an array passed to a function in C++?

Automatically

Explicitly using &

As a reference

As a value

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements correctly declares a pointer to an integer?

int ptr*;

int* ptr;

int ptr;

ptr int;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the indirection operator (*) do when applied to a pointer?

Prints the address of the pointer

Points to another pointer

Accesses the value the pointer points to

Creates a new pointer

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following can hold the address of an integer?

int*

float*

char*

double*

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given int x = 25; int *ptr = &x;, what will *ptr output?

Memory address of x

Value of x

Undefined behavior

0

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?