
C++ Pointers
Quiz
•
Computers
•
3rd Grade
•
Practice Problem
•
Hard
Marius Gangan
Used 2+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a pointer in C++?
A function that returns the value of a variable in C++
A type of data structure in C++
A variable that holds the memory address of another variable
A keyword used to declare a variable in C++
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a pointer in C++?
int ptr;
ptr = ∫
int *ptr;
ptr = int;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the use of the 'new' keyword in C++?
To dynamically allocate memory for a variable or an object.
To declare a constant variable
To print a message to the console
To create a new function
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a pointer and a reference in C++?
A pointer stores the memory address of another variable, while a reference is an alias for a variable.
A pointer is used for primitive data types, while a reference is used for complex data types
A pointer can only be used to access the value of a variable, while a reference can only be used to access the memory address
A pointer and a reference both store the actual value of a variable
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you dereference a pointer in C++?
pointerVariable--
pointerVariable++
(*pointerVariable)
pointerVariable*
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a null pointer in C++?
A pointer that does not point to any memory location
A pointer that points to the beginning of the memory
A pointer that points to a random memory location
A pointer that points to a specific memory address
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the 'this' pointer in C++?
Pointer that points to a random memory location
Pointer that points to the object for which a member function is called
Pointer that points to the beginning of a string
Pointer that points to the end of an array
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
Cyber Security
Quiz
•
1st - 10th Grade
14 questions
Quiz sobre documentos y dibujos de google, y dispositivos
Quiz
•
1st - 6th Grade
6 questions
design thinking process
Quiz
•
3rd Grade
10 questions
2.-Placa Base, puertos y ranuras
Quiz
•
3rd Grade
12 questions
Quizz Internet
Quiz
•
KG - Professional Dev...
10 questions
BÀI 8. SẮP XẾP VÀ LỌC DỮ LIỆU
Quiz
•
1st - 12th Grade
10 questions
Programação de Computadores - Aula - 5
Quiz
•
1st - 3rd Grade
10 questions
TEST NORMAS DE LA SALA DE TECNOLOGIA
Quiz
•
3rd - 5th 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
