
C++ Pointers Quiz
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Medium
Fidaa Abed
Used 2+ times
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Artificial Intelligence
Quiz
•
6th - 12th Grade
11 questions
Execl Quiz
Quiz
•
7th Grade - University
10 questions
ôn giưa ki 2 tin12
Quiz
•
12th Grade
12 questions
FD2 E MÉDIO
Quiz
•
9th - 12th Grade
10 questions
Soal BAB V PemWeb
Quiz
•
12th Grade
10 questions
Excel
Quiz
•
11th - 12th Grade
10 questions
Tin học 10 Bài 20
Quiz
•
12th Grade - University
10 questions
Google Docs Quiz 1
Quiz
•
6th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
