A) All arithmetic operations that are legal in C++
B) Multiplication, division, addition, and subtraction
C) Addition , subtraction , preincrement, and postincrement
D) Only multiplication and addition
E) None of the above
Correct Answer
verified
Multiple Choice
A) the variable called ptr will store an integer value.
B) the variable called *ptr will store an asterisk and an integer value.
C) ptr is a pointer variable that will store the address of an integer variable.
D) All of the above
E) None of the above
Correct Answer
verified
Multiple Choice
A) is pointing to an object that is still valid after the return of the function.
B) has been assigned an address.
C) was received as a parameter by the function.
D) has not previously been returned by another function.
E) None of the above
Correct Answer
verified
True/False
Correct Answer
verified
True/False
Correct Answer
verified
True/False
Correct Answer
verified
True/False
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) cout << num1;.
B) cout << *num1;.
C) cout << &(*num1) ;.
D) cout << &num1;.
E) None of the above
Correct Answer
verified
Multiple Choice
A) the pointer p becomes a dangling pointer.
B) the compiler will automatically deallocate the memory pointed to by p.
C) the program will suffer from memory leaks.
D) the returning function will throw the bad_alloc exception.
E) None of the above
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) output the dereferenced value pointed to by p.
B) result in a compiler error.
C) output the address stored in p.
D) output the value stored in s.
E) None of the above
Correct Answer
verified
Multiple Choice
A) the ampersand, &.
B) an asterisk, *.
C) the structure pointer operator, ->.
D) the dereference operator, <-.
E) None of the above
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) delete p;
B) p delete[ ];
C) delete [ ] p;
D) delete array p;
E) None of the above
Correct Answer
verified
Multiple Choice
A) any non-zero integer value.
B) the address of an existing variable of the appropriate type.
C) A and B are both True.
D) None of the above
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) int ptr = &num1;
B) int ptr = int *num1;
C) float num1 = &ptr2;
D) All of the above are valid.
E) All of the above are invalid.
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) to avoid the overhead of copying large data structures.
B) to allow the called function to modify a variable accessible to the calling function.
C) to allow easy access to data in the function that is being called.
D) A and B are both True.
E) None of the above
Correct Answer
verified
Showing 1 - 20 of 62
Related Exams