Exam 8: Pointers and Pointer-Based Strings
Exam 1: Introduction to Computers and C++32 Questions
Exam 2: Introduction to C Programming; Inputoutput and Operators22 Questions
Exam 3: Introduction to Classes, Objects and Strings33 Questions
Exam 4: Control Statements, Assignment, and Operators29 Questions
Exam 5: Control Statements, Logical Operators31 Questions
Exam 6: Functions and an Introduction to Recursion48 Questions
Exam 7: Class Templates Array and Vector; Catching Exceptions18 Questions
Exam 8: Pointers and Pointer-Based Strings32 Questions
Exam 9: Classes: a Deeper Look; Throwing Exceptions35 Questions
Exam 10: Operator Overloading; String and Array Objects34 Questions
Exam 11: Object-Oriented Programming: Inheritance17 Questions
Exam 12: Object-Oriented Programming: Polymorphism27 Questions
Exam 13: Stream Inputoutput: a Deeper Look34 Questions
Exam 14: File Processing19 Questions
Exam 15: Standard Library Containers and Iterators33 Questions
Exam 16: Standard Library Algorithms27 Questions
Exam 17: Exception Handling: a Deeper Look20 Questions
Exam 18: Introduction to Custom Templates9 Questions
Exam 19: Custom Templatized Data Structures17 Questions
Exam 20: Searching and Sorting10 Questions
Exam 21: Class String and String Stream Processing28 Questions
Exam 22: Bits, Characters, C Strings and Structs30 Questions
Exam 23: Other Topics22 Questions
Exam 24: C++11 Additional Features56 Questions
Select questions type
Comparing pointers and performing pointer arithmetic on them is meaningless unless:
Free
(Multiple Choice)
4.9/5
(32)
Correct Answer:
A
A function that modifies an array by using pointer arithmetic such as ++ptr to process every value of the array should have a parameter that is:
Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
A
Given that k is an integer array starting at location 2000, kPtr is a pointer to k and each integer is stored in 4 bytes of memory, what location does kPtr + 3 point to?
(Multiple Choice)
4.9/5
(34)
Which of the following is false about a function to which a built-in array is being passed?
(Multiple Choice)
4.8/5
(28)
Which of the following best describes the array name n in the declaration int n[10];?
(Multiple Choice)
4.9/5
(36)
Assuming that t is an array and tPtr is a pointer to that array, which expression refers to the address of element 3 of the array?
(Multiple Choice)
4.9/5
(37)
Which of the following statements about pointer initialization and values is false?
(Multiple Choice)
4.8/5
(32)
All of the following can cause a fatal execution-time error except:
(Multiple Choice)
4.9/5
(40)
Consider the following function: void reverse(char *string1, const char *string2)
{
Int stringsize{sizeof(string1)/sizeof(char)};
*(string1 + stringsize - 1) = '\0';
String1 = string1 + stringsize - 2;
For (; *string2 != '\0'; string1--, string2++) {
*string1 = *string2;
}
}
What technique does the function use to refer to array elements?
(Multiple Choice)
4.8/5
(27)
Which of the following gives the number of elements in the array int r[10]?
(Multiple Choice)
4.8/5
(32)
getline(superstring, 30); is equivalent to which of the following?
(Multiple Choice)
4.7/5
(37)
Given a built-in array of ints named values, which of the following statements would sort the array?
(Multiple Choice)
4.9/5
(32)
Which of the following is not a correct way to initialize a built-in array?
(Multiple Choice)
4.8/5
(30)
Showing 1 - 20 of 32
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)