
C++ Pointers

Quiz
•
Computers
•
3rd Grade
•
Hard
Marius Gangan
Used 2+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
5 questions
Pre-assessment on Keyboarding

Quiz
•
3rd Grade
15 questions
CodeMonkey Final Exam G3 2-2024

Quiz
•
3rd Grade
14 questions
CodeSpark Lesson 1 Quiz

Quiz
•
1st - 5th Grade
14 questions
CSF3 - Assessment

Quiz
•
3rd Grade
14 questions
ICT General

Quiz
•
3rd Grade
12 questions
Computer Science

Quiz
•
3rd - 12th Grade
12 questions
Parts of the Keyboard

Quiz
•
1st - 3rd Grade
12 questions
MSW LOGO

Quiz
•
3rd Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
13 questions
Subject Verb Agreement

Quiz
•
3rd Grade
15 questions
Plural Nouns

Quiz
•
3rd Grade
10 questions
Place Value

Quiz
•
3rd Grade
17 questions
Multiplication facts

Quiz
•
3rd Grade
20 questions
Irregular Plural Nouns

Quiz
•
3rd Grade
20 questions
Subject and Predicate Review

Quiz
•
3rd Grade
20 questions
Division Facts

Quiz
•
3rd Grade
12 questions
Map Skills

Quiz
•
3rd Grade