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

State which of the following are true and which are false. If false, explain why

ID: 3651079 • Letter: S

Question

State which of the following are true and which are false. If false, explain why.

a) To refer to a particular location or element within an array, we specify the name of the
array and the value of the particular element.

b) An array definition reserves space for the array.

c) To indicate that 100 locations should be reserved for integer array p, write
p[ 100 ];

d) A C program that initializes the elements of a 15-element array to zero must contain
one for statement.

e) A C program that totals the elements of a double-subscripted array must contain nested
for statements.

f) The mean, median and mode of the following set of values are 5, 6 and 7, respectively:
1, 2, 5, 6, 7, 7, 7.

Explanation / Answer

a) False. We specify the name of the array and the index of that element considering 0 as the base address.

b) True.

c) True.(Statement is little ambiguous)

d) False. There are other ways of initialization. eg int my_array[15]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}.

e) False. Other statements can be used like while.

f)True

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