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
Which of the following statements is not valid C++ code?
Free
(Multiple Choice)
4.8/5
(34)
Correct Answer:
E
A pointer can be used as a function argument, giving the function access to the original argument.
Free
(True/False)
4.8/5
(33)
Correct Answer:
True
When the less than operator (<) is used between two pointer values, the expression is testing whether
Free
(Multiple Choice)
4.8/5
(29)
Correct Answer:
C
In C++11, the __________ keyword was introduced to represent address 0.
(Multiple Choice)
5.0/5
(36)
Assuming myValues is an array of int values and index is an int variable, both of the following statements do the same thing.
1. cout << myValues[index] << endl;
2. cout << *(myValues + index) << endl;
(True/False)
4.8/5
(32)
In the following statement, what does int mean?
Int *ptr = nullptr;
(Multiple Choice)
4.9/5
(37)
Select all that apply. Select as many of the following options that make this sentence true:
The contents of pointer variables may be changed with mathematical statements that perform
(Multiple Choice)
4.9/5
(38)
What will the following code output?
Int number = 22;
Int *var = &number;
Cout << *var << endl;
(Multiple Choice)
4.9/5
(39)
Which of the following defines a unique_ptr named uniq that points to a dynamically allocated int?
(Multiple Choice)
4.9/5
(38)
With pointer variables you can access but not modify data in other variables.
(True/False)
5.0/5
(36)
A function may return a pointer but the programmer must ensure that the pointer
(Multiple Choice)
4.8/5
(26)
Select all that apply. Of the following, which statements have the same meaning?
(Multiple Choice)
4.9/5
(30)
What will the following code output?
Int number = 22;
Int *var = &number;
Cout << var << endl;
(Multiple Choice)
4.9/5
(40)
In C++11, the nullptr keyword was introduced to represent the address 0.
(True/False)
4.8/5
(41)
C++ does not perform array bounds checking, making it possible for you to assign a pointer the address of an element out of the boundaries of an array.
(True/False)
4.9/5
(36)
Showing 1 - 20 of 47
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)