State which of the following are true and which are false. If false, explain why
ID: 3651161 • 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
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.