Question: EXERCISES FOR C++ 1. If you use dynamic memory allocation to allocate memory for arrays the Operating Systems will allocate a block of contiguous memory

EXERCISES FOR C++

1. If you use dynamic memory allocation to allocate memory for arrays the Operating Systems will allocate a block of contiguous memory for the array thus the random access to array elements will be preserved. TRUE FALSE

2. Show the syntax to declare a constant pointer to a Point object.

3. Assuming the following declaration:

Order * order_database [1024] = { NULL } ;

Which of the below is correct?

A. To free memory for order_database one must use: delete [ ] order_database.

B. order_database is an array of Order objects

C. All elements in order_database are pointers to Order and initialized to NULL

D. None of the above

4. What's the difference between static array and dynamic array?

A. The memory of dynamic array must be de-allocated using delete [ ]

B. The memory of static array must be de-allocated using delete [ ]

C. The array variable name of dynamic array is a constant pointer

D. Both A and C

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!