Exam 9: Pointers
Exam 1: Introduction to Computers and Programming47 Questions
Exam 2: Introduction to C62 Questions
Exam 3: Expressions and Interactivity45 Questions
Exam 4: Making Decisions51 Questions
Exam 5: Loops and Files60 Questions
Exam 6: Functions49 Questions
Exam 7: Arrays and Vectors56 Questions
Exam 8: Searching and Sorting Arrays30 Questions
Exam 9: Pointers47 Questions
Exam 10: Characters, C-Strings, and More About the String Class47 Questions
Exam 11: Structured Data46 Questions
Exam 12: Advanced File Operations38 Questions
Exam 13: Introduction to Classes54 Questions
Exam 14: More About Classes46 Questions
Exam 15: Inheritance, Polymorphism, and Virtual Functions43 Questions
Exam 16: Exceptions and Templates36 Questions
Exam 17: The Standard Template Library38 Questions
Exam 18: Linked Lists41 Questions
Exam 19: Stacks and Queues47 Questions
Exam 20: Recursion27 Questions
Exam 21: Binary Trees39 Questions
Select questions type
Not all arithmetic operations can be performed on pointers. For example, you cannot __________ or __________ pointers.
(Multiple Choice)
4.9/5
(25)
After the code shown executes, which of the following statements is true?
Int numbers[] = {0, 1, 2, 3, 4};
Int *ptr = numbers;
Ptr++;
(Multiple Choice)
4.8/5
(35)
In C++11 you can use smart pointers to dynamically allocate memory and not worry about deleting the memory when you are finished using it.
(True/False)
4.8/5
(37)
When you work with a dereferenced pointer, you are actually working with
(Multiple Choice)
4.9/5
(29)
If a variable uses more than one byte of memory, for pointer purposes its address is
(Multiple Choice)
4.8/5
(35)
To help prevent memory leaks from occurring in C++11, a __________ automatically deletes a chunk of dynamically allocated memory when the memory is no longer being used.
(Multiple Choice)
4.9/5
(26)
The weak_ptr can share ownership of a piece of dynamically allocated memory.
(True/False)
4.8/5
(37)
With pointer variables you can __________ manipulate data stored in other variables.
(Multiple Choice)
4.9/5
(31)
Which of the following statements deletes memory that has been dynamically allocated for an array?
(Multiple Choice)
4.8/5
(32)
What will the following code output?
Int *numbers = new int[5];
For (int i = 0; i <= 4; i++)
*(numbers + i) = i;
Cout << numbers[2] << endl;
(Multiple Choice)
4.7/5
(33)
The __________ and __________ operators can be used to increment or decrement a pointer variable.
(Multiple Choice)
4.8/5
(35)
The unique_ptr is the sole owner of a piece of dynamically allocated memory.
(True/False)
4.7/5
(34)
To use any of the smart pointers in C++11 you must use the following directive in the header file:
#include <memory>
(True/False)
4.8/5
(37)
An array name is a pointer constant because the address stored in it cannot be changed at runtime.
(True/False)
4.9/5
(32)
It is legal to subtract a pointer variable from another pointer variable.
(True/False)
4.9/5
(36)
The __________, also known as the address operator, returns the memory address of a variable.
(Multiple Choice)
4.9/5
(36)
When you pass a pointer as an argument to a function, you must
(Multiple Choice)
4.9/5
(32)
Select all that apply. Which of the following can be used as pointers?
(Multiple Choice)
4.9/5
(38)
Showing 21 - 40 of 47
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)