Code analysis question in C. Please explain the answers that I have bolded and i
ID: 3770264 • Letter: C
Question
Code analysis question in C. Please explain the answers that I have bolded and italicized.
int a[] = {1, 8, 3, 2, 4, 7, 10, 0, 11};
int totNum = sizeof(a)/sizeof(int);
int x, maxVal;
maxVal = ___1___;
for(x=0;x<totNum;x++)
{
if(___2___ > ___3___)
maxVal = a[x];
}
25) What is the value of ___1___ in order to find the maximum value in the array and store it into maxVal?
a)0
d) -1
c)x
d) a[0]
e) None of the above
26) What is the value of ___2___ in order to find the maximum value in the array and store it into maxVal?
a)0
d) a[x]
c)x
d) a[0]
e) None of the above
27) What is the value of ___3___ in order to find the maximum value in the array and store it into maxVal?
a)0
d) a[x]
c)x
d) a[0]
e) None of the above.. answer is tmaxVal
Explanation / Answer
25)
d)a[0]
26)
d)a[x]
27)
e) None of the above.. answer is tmaxVal
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.