Exam 10: Pointers and Dynamic Arrays
Exam 1: C++ Basics37 Questions
Exam 2: Flow of Control33 Questions
Exam 3: Function Basics30 Questions
Exam 4: Parameters and Overloading31 Questions
Exam 5: Arrays32 Questions
Exam 6: Structures and Classes37 Questions
Exam 7: Constructors and Other Tools32 Questions
Exam 8: Operator Overloading,friends,and References31 Questions
Exam 9: Strings37 Questions
Exam 10: Pointers and Dynamic Arrays29 Questions
Exam 11: Separate Compilation and Namespaces35 Questions
Exam 12: Streams and File IO43 Questions
Exam 13: Recursion40 Questions
Exam 14: Inheritance30 Questions
Exam 15: Polymorphism and Virtual Functions34 Questions
Exam 16: Templates27 Questions
Exam 17: Linked Data Structures30 Questions
Exam 18: Exception Handling29 Questions
Exam 19: Standard Template Library46 Questions
Exam 20: Patterns and Uml22 Questions
Select questions type
Given the declarations below,write a code fragment that allocates a nameless variable for pointer p1 to point to.
int *p1,*p2;
(Short Answer)
4.8/5
(34)
Tell about the freestore (also known as heap).What is put there? How is this done? How does a program access the freestore? What happens to memory that has been allocated but is no longer needed?
(Essay)
4.8/5
(38)
One can use the & operator to extract the value that a pointer points to.
(True/False)
4.8/5
(43)
A copy constructor has the same name as the class (let's call it A)and has a parameter that
(Multiple Choice)
4.9/5
(43)
Here is the first line of the copy constructor for PFArrayD.The identifier PFArrayD is the name of the class,but in the header it is used three times with different meaning each time.Give the meaning for each use:
PFArrayD::PFArrayD( const PFArrayD& pfaObject)
(Essay)
4.9/5
(30)
Write a type definition for a type called NumberPtr that will be the type for pointer variables that hold pointers to dynamic variables of type double.Also,write a declaration for a pointer variable called myPoint,which is of type NumberPtr.
(Short Answer)
4.8/5
(39)
Describe the action of the new operator.What does the new operator return? What are the indications of error?
(Essay)
5.0/5
(42)
Showing 21 - 29 of 29
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)