
C++ Pointers Quiz

Quiz
•
Computers
•
12th Grade
•
Medium
Fidaa Abed
Used 2+ times
FREE Resource
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.
Similar Resources on Wayground
10 questions
AP CS A Unit 6 Quiz PRACTICE

Quiz
•
9th - 12th Grade
5 questions
AP Computer Science A Unit 6 Lesson 1 (Introduction)

Quiz
•
10th - 12th Grade
7 questions
C++ Arrays Quiz

Quiz
•
12th Grade
8 questions
CAI710: WQ1

Quiz
•
12th Grade
11 questions
Soal ulangan kelas X

Quiz
•
10th Grade - University
10 questions
Quiz on Pointers in C Programming

Quiz
•
12th Grade
10 questions
Mashdemy 11-15 AI/ML

Quiz
•
9th - 12th Grade
10 questions
Revision Quiz Game- 2

Quiz
•
12th Grade
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade