Consider the following code. (Assume that all variables are properly declared.)cin >> ch;while (cin){  cout > ch;}This code is an example of a(n) ____ while loop.

A. sentinel-controlled
B. flag-controlled
C. EOF-controlled
D. counter-controlled

Answer: C

Computer Science & Information Technology

You might also like to view...

Answer the following statements true (T) or false (F)

1. A loader combines code from different programs into one file. 2. In the testing phase of the software development method you know your program is correct if it runs correctly once. 3. The person who maintains the program is not always the same as the person who wrote it. 4. The C++ word cout is used to display information on the screen. 5. It is ethical for programmers to copy software without permission.

Computer Science & Information Technology

Consider the problem of jobs waiting in a queue until sufficient memory becomes available for them to be loaded and executed. If the queue is a simple first-in-first-out structure, then only the job at the head of the queue may be considered for placement in memory. With a more complex queuing mechanism, it might be possible to examine the entire queue to choose the next job to be loaded and executed. Show how the latter discipline, even though more complex, might yield better throughput than the simple first-in-first-out strategy. What problem could the latter approach suffer from?

What will be an ideal response?

Computer Science & Information Technology