Exam 5: Understanding Arrays, Strings and Pointers
Is there ever a circumstance when you can type two characters within single quotation marks? Explain.
You can type two characters within single quotation marks, but only when they represent a single character. For example, '\n' represents the newline character. (Remember, the newline character contains the code that moves subsequent output to the next line.) You actually type a backslash and an n within the single quotation marks, but you can do so only because the combination represents one character stored in computer memory.,
____________________ are variables that can hold memory addresses.
Pointers,Pointer variables,Pointer variables (or pointers)
How does the hexadecimal numbering system work?
The hexadecimal numbering system uses the values 0 through 9 and the letters A through F to represent the decimal values 10 through 15. Each column or place in a hexadecimal number is 16 times the value of the column to its right. For example, the hexadecimal number 10 represents 16, the hexadecimal number 11 represents 17, and the hexadecimal number 1A represents 26.,
If you create a firstName string and initialize it to "Mary" , and then use the C++ statement cout , the output is ____.
In C++, it is conventional to begin class names with a(n) ____________________ letter.
Depending on your compiler, you might have to use the statement ____ at the top of your file to use the strcpy() function.
Suppose you create a structure that has an integer field called partNum ; Next, you create an array of ten elements of objects of this structure. Which of the following is a correct way to access the first element of the array?
C++ programmers do not refer to an array of characters as a string unless the last usable character in the string is the null character.
Identify and describe two common errors that are easy to make when manipulating arrays.
A convenient way to set all array elements to zero is to declare as follows: int rent[20] = ____; .
To indicate that a variable is a pointer, you should begin the variable's name with a(n) ____.
You can use the address operator (____) to examine the memory address of a variable.
int , char , double , and float are primitive or ____________________ data types.
____ arrays are corresponding arrays in which values in the same relative locations are logically related.
In C++, the first element in any array is the element with the 1 subscript.
Complete the following program, which displays all the values in the array:
Const int SZ_OF_ARRAY = 5;
Int arrayInt[SZ_OF_ARRAY] = {34, 56, 12, 3, 99};
For(int x = 0; ____ ; ++x)
Cout
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)