What is wrong with the following code?
??
int xNum, yNum;do    for (xNum = 1; xNum < 10; xNum += 1)      yNum += 2;while (yNum < 20);
?

A. the do loop needs opening and closing braces
B. the for loop needs opening and closing braces
C. yNum should be initialized
D. a for loop cannot be inside a do while loop


Answer: C

Computer Science & Information Technology

You might also like to view...

A _____ network typically connects personal computers within a very limited geographical area.

A. local area B. wide area C. virtual D. private

Computer Science & Information Technology

This is an IP address created to be shared by a group of network devices. It is purposely created as a floating IP address to be used in network proxy, like Port Address Translation (PAT), and in high availability (HA) technologies like load balancing and Virtual Router Redundancy Protocol (VRRP).

What will be an ideal response?

Computer Science & Information Technology

What is the Session menu? When and where does it appear? How do you use it?

What will be an ideal response?

Computer Science & Information Technology

Suppose processes P1, P2 and P3 share the critical section. P1 sends a request to enter the critical section at logical time 1. P2 sends a request to enter the critical section at logical time 2. P3 sends a request to enter the critical section at logical time 3. Apply Ricart and Agrawala’s algorithm to demonstrate how mutual exclusion is achieved.

What will be an ideal response?

Computer Science & Information Technology