A) Multiplication, division, addition, and subtraction
B) Addition , subtraction , preincrement, and postincrement
C) Only multiplication and addition
D) All arithmetic operations that are legal in C++
E) None of the above
Correct Answer
verified
Multiple Choice
A) the memory address of the variable called num1.
B) the value stored in the variable called num1.
C) the number 1.
D) the string "&num1".
E) None of the above
Correct Answer
verified
Multiple Choice
A) creates a new pointer called int.
B) sets ptr to point to the allocated memory.
C) initializes the allocated memory to 0.
D) assigns an integer value to the variable called ptr.
E) None of the above
Correct Answer
verified
Multiple Choice
A) a copy of the value pointed to by the pointer variable.
B) a variable whose memory has been deallocated.
C) the variable whose address is stored in the pointer variable.
D) All of the above
E) None of the above
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) int* ptr;.
B) int ptr*;.
C) *int ptr;.
D) int ptr;.
E) None of the above
Correct Answer
verified
Multiple Choice
A) C++ string objects
B) Punctuation marks
C) Array names
D) All of the above
E) None of the above
Correct Answer
verified
Multiple Choice
A) clear the data from the old operator
B) use a preprocessor directive.
C) use delete afterwards to free the memory allocated by new.
D) All of the above
E) None of the above
Correct Answer
verified
Multiple Choice
A) output the value stored in s.
B) output the dereferenced value pointed to by p.
C) output the address stored in p.
D) result in a compiler error.
E) None of the above
Correct Answer
verified
Multiple Choice
A) stores the keyboard input into the variable pointed to by p.
B) is illegal in C++.
C) stores the keyboard input into the pointer called p.
D) stores the keyboard input into the variable p.
E) None of the above
Correct Answer
verified
Multiple Choice
A) the address of an existing variable of the appropriate type.
B) any non- zero integer value.
C) A and B are both true.
D) None of the above
Correct Answer
verified
Multiple Choice
A) delete [ ] p;
B) delete array p;
C) delete p;
D) p delete[ ];
E) None of the above
Correct Answer
verified
Multiple Choice
A) the address of the variable stored in ptr.
B) the string "*ptr".
C) the value stored in the variable whose address is contained in ptr.
D) the address of the variable whose address is stored in ptr.
E) None of the above
Correct Answer
verified
Multiple Choice
A) will always result in a compiler error.
B) is illegal in C++.
C) adds the address of the pointer arr to sum.
D) adds the value stored in arr[0] to sum.
E) None of the above
Correct Answer
verified
Multiple Choice
A) a memory address.
B) an integer.
C) any legal C++ value.
D) only floating- point values.
E) None of the above
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) defines a pointer variable called num.
B) defines a variable of type double called num.
C) initializes a variable called *num.
D) defines and initializes a pointer variable called num.
E) None of the above
Correct Answer
verified
Multiple Choice
A) float num1 = &ptr2;
B) int ptr = &num1;
C) int ptr = int *num1;
D) All of the above are valid.
E) All of the above are invalid.
Correct Answer
verified
Multiple Choice
A) seldom
B) never
C) indirectly
D) All of the above
E) None of the above
Correct Answer
verified
True/False
Correct Answer
verified
Showing 21 - 40 of 50
Related Exams