Question: Question 4 (10 marks) a) Given the following declaration. Draw how the elements of the array are organized and stored in memory [2 m) i.

Question 4 (10 marks) a) Given the following declaration. Draw how the elements of the array are organized and stored in memory [2 m) i. char month[ ] = { 'J', 'A', 'N' }; ii.char name[ ] = "JANE"; b) Based on the question a)i, what is the output of the following statement: printf("%c", month[1] +1); [1 m) UJ White statements that satisfy the following requirements. The sample output is shown in Figure 4. i. Declare a one-dimensional integer array NUM of length 5 [1 m) ii. Ask the user to enter 5 integer numbers and store in the array NUM. [3 m) iii. Display all the elements of the array NUM. [3 m] Enter 5 numbers : element - 0 : 1 element - 1 : 1 element - 2 : 2 element - 3 : 3 element - 4 : 4 Elements in array NUM are: 1 1 2 3 4 Figure 4: Sample output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
