Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The address in a pointer in a pointer constant remains the same each time the pr

ID: 3854786 • Letter: T

Question

The address in a pointer in a pointer constant remains the same each time the program is run. An array is a collection of elements of the same data type. In the declaration for a fixed-length array, the size may be a constant or a variable. The first element in an array is accessed using an index of 1. Only fixed-length arrays can be initialized when they are defined. Initializer values for an array are enclosed between the symbols [and]. If the number of values provided in the initializer is fewer than the number elements in the array, the unassigned elements are filled with zeros.

Explanation / Answer

Ans 1) True

When we compile our program the adderess which is assigned is virtual so due to this virtual memory processes have their own independent space in which they operates witout affecting others. So this assigned address could be deterministic every time.

Ans 2) True

Array is basically collection of same type values because we store array elements in consecutive memory location and before storing data we need to initialize first, so it is must that all data is of same type.

Ans 3) True

At the time of declaration of array we can take size of array fixed or variable length.

Ans 4) False

Beacuse when we store data to memory first offset value is taken as 0, so first element is always accessed by index 0.

Ans 5) True

Before initializing array values we first need to declare array with fixed size.

Ans 6) False

While initializing whole array we use { } like

int sample[5] = { 1, 2, 3, 4, 5};

or we can initialize individual elements like:

sample[0] = 1;

sample[1] = 2; and so on.

Ans 7) True

Because if do not assign any value in array then it will default value for int/float/double it is zero and in case of boolean false means 0 and char its null which is u0000.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote