Exam 10: Pointers
Exam 1: Introduction to Computers and Programming40 Questions
Exam 2: Introduction to C Plus Plus40 Questions
Exam 3: Expressions and Interactivity40 Questions
Exam 4: Making Decisions40 Questions
Exam 5: Looping40 Questions
Exam 6: Functions40 Questions
Exam 7: Introduction to Classes and Objects40 Questions
Exam 8: Arrays40 Questions
Exam 9: Searching, Sorting, Algorithm Analysis40 Questions
Exam 10: Pointers62 Questions
Exam 11: More About Classes and Object-Oriented Programming70 Questions
Exam 12: More on C-Strings and the String Class40 Questions
Exam 13: Advanced File and Io Operations40 Questions
Exam 14: Recursion20 Questions
Exam 15: Polymorphism and Virtual Functions22 Questions
Exam 16: Exceptions, Templates, and the Standard Template Library Stl40 Questions
Exam 17: Linked Lists38 Questions
Exam 18: Stacks and Queues36 Questions
Exam 19: Binary Trees38 Questions
Select questions type
To dereference a structure pointer and simultaneously access a member of the structure, the appropriate operator to use is
Free
(Multiple Choice)
4.9/5
(35)
Correct Answer:
C
The ampersand (&) is used to dereference a pointer variable in C++.
Free
(True/False)
4.8/5
(44)
Correct Answer:
False
If s is a structure variable and p, a pointer, is a member of the structure, the statement cout << *s.p; will
Free
(Multiple Choice)
4.9/5
(34)
Correct Answer:
A
With pointer variables you can access, but you cannot modify, data in other variables.
(True/False)
5.0/5
(33)
A function may return a pointer, but the programmer must ensure that the pointer
(Multiple Choice)
4.7/5
(34)
Suppose that a function dynamically allocates a block of memory with a local pointer variable p pointing to the allocated block. Suppose further that there are no other pointers referencing that block of memory, and the function returns without doing a delete on p. Then
(Multiple Choice)
4.7/5
(32)
An array name is a pointer constant because the address it represents cannot be changed during run-time.
(True/False)
4.8/5
(38)
A statement that displays the address of the variable num1 is
(Multiple Choice)
4.8/5
(29)
The expression *s->p; is only meaningful if s is a pointer to a structure and p is a pointer that is a member of that structure.
(True/False)
4.9/5
(30)
Which of the following statements correctly deletes a dynamically-allocated array pointed to by p?
(Multiple Choice)
4.8/5
(35)
Showing 1 - 20 of 62
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)