C++ Pointers Quiz

C++ Pointers Quiz

12th Grade

7 Qs

quiz-placeholder

Similar activities

Bài 6_Lớp 11_Tại lớp

Bài 6_Lớp 11_Tại lớp

12th Grade

10 Qs

C#. Знакомство с ООП и WindowsForms

C#. Знакомство с ООП и WindowsForms

1st Grade - Professional Development

11 Qs

Administrasi Sistem Jaringan

Administrasi Sistem Jaringan

12th Grade

10 Qs

python-BTxâu

python-BTxâu

9th - 12th Grade

10 Qs

HTML

HTML

9th - 12th Grade

12 Qs

Creating a document

Creating a document

1st Grade - Professional Development

9 Qs

ClaseDispositivosPc

ClaseDispositivosPc

6th Grade - University

10 Qs

Working around Adobe Photoshop

Working around Adobe Photoshop

12th Grade

10 Qs

C++ Pointers Quiz

C++ Pointers Quiz

Assessment

Quiz

Computers

12th Grade

Practice Problem

Medium

Created by

Fidaa Abed

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a pointer in C++?

A) A type of C++ operator

B) A variable that stores the address of another variable

C) A function that returns an integer

D) A memory allocation technique

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

A) *

B) &

C) #

D) %

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you access the value stored in the address a pointer p is pointing to?

A) &p

B) *p

C) #p

D) p&

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid pointer arithmetic operation?

A) ptr + 5

B) ptr * 3

C) ptr % 2

D) ptr / 4

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is correct about pointer types in C++?

A) A pointer to an integer can hold the address of a float.

B) Different types of pointers have different sizes.

C) All pointers in C++ have the same size regardless of datatype.

D) Pointers of different types have different default values.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? cppCopy code int x = 10; int *p = &x; cout << *p;

A) A memory address

B) 10

C) An error message

D) Undefined

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If arr is an array of integers, which statement is correct?

A) *(arr + 1) gives the first element of the array.

B) *(arr + 1) gives the second element of the array.

C) *(arr + 1) gives the address of the first element of the array.

D) *(arr + 1) is undefined.

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?