1. A. counter-controlled loop B. sentinel-controlled loop C. general conditional
ID: 3539404 • Letter: 1
Question
1.
A. counter-controlled loop B. sentinel-controlled loop C. general conditional loop D. do-while loop E. None of the above 2. For the following program segment, the value stored in variable s at the end of the execution of the loop could best be described as the ____________.z = 0; g = 0; s = 0; i = 0;
while (i < 50)
{
cin >> t;
s += t;
if (t >= 0)
g++;
else
z++;
i++;
} A. average of the numbers read B. largest of all numbers read C. sum of all numbers read D. number of numbers read E. sentinel value terminating the loop 3. Files usually reside in a computer's ____________. A. arithmetic unit B. control unit C. data display D. secondary storage unit E. printer 4.Assuming function readDay () is a public function of class day and today is an object of this class, how would the function be accessed from outside the class? A. today::readDay (); B. today.readDay (); C. today = readDay; D. readDay (today); E. readDay.today 5. The class constructor for class grades can be named ____________. A. initialize B. counter C. grades D. grades::initialize E. any valid function name
Explanation / Answer
.
2.
3.data display
4.
5.grades
general conditional loopRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.