Exam 10: Characters, C++-Strings, and More About the String Class
Exam 1: Introduction to Computers and Programming44 Questions
Exam 2: Introduction to C++56 Questions
Exam 3: Expressions and Interactivity44 Questions
Exam 4: Making Decisions53 Questions
Exam 5: Loops and Files62 Questions
Exam 6: Functions49 Questions
Exam 7: Arrays53 Questions
Exam 8: Searching and Sorting Arrays20 Questions
Exam 10: Characters, C++-Strings, and More About the String Class42 Questions
Exam 11: Structured Data43 Questions
Exam 11: Structured Data50 Questions
Exam 12: Advanced File Operations38 Questions
Exam 13: Introduction to Classes46 Questions
Exam 14: More About Classes40 Questions
Exam 15: Inheritance, Polymorphism, and Virtual Functions38 Questions
Exam 16: Exceptions, Templates, and the Standard Template Library STL39 Questions
Exam 17: Linked Lists40 Questions
Exam 18: Stacks and Queues46 Questions
Exam 19: Recursion21 Questions
Exam 20: Binary Trees38 Questions
Select questions type
Look at the following statement: sum += *array++;
This statement...
(Multiple Choice)
4.8/5
(34)
When the less than ( < ) operator is used between two pointer variables, the expression is testing whether
(Multiple Choice)
4.9/5
(34)
Look at the following code. int numbers[] = {0, 1, 2, 3, 4 };
Int *ptr = numbers;
Ptr++;
After this code executes, which of the following statements is true?
(Multiple Choice)
4.8/5
(42)
What will the following code output? int number = 22;
Int *var = &number;
Cout << *var << endl;
(Multiple Choice)
4.8/5
(37)
If a variable uses more than one byte of memory, for pointer purposes its address is:
(Multiple Choice)
4.8/5
(35)
Assuming myValues is an array of int values, and index is an int variable, both of the following statements do the same thing.
cout << myValues[index] << endl;
cout << *(myValues + index) << endl;
(True/False)
4.9/5
(21)
The ampersand (&) is used to dereference a pointer variable in C++.
(True/False)
4.7/5
(37)
The _________ , also known as the address operator, returns the memory address of a variable.
(Multiple Choice)
4.9/5
(39)
Not all arithmetic operations may be performed on pointers. For example, you cannot ________ or __________ a pointer.
(Multiple Choice)
4.8/5
(42)
Assuming ptr is a pointer variable, what will the following statement output? cout << *ptr;
(Multiple Choice)
4.8/5
(33)
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)
When you pass a pointer as an argument to a function, you must
(Multiple Choice)
4.9/5
(43)
When using the new operator with an older compiler, it is good practice to:
(Multiple Choice)
4.7/5
(35)
A function may return a pointer, but the programmer must ensure that the pointer
(Multiple Choice)
4.9/5
(36)
Showing 21 - 40 of 42
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)