http://www.cs.wisc.edu/~bart/537/quizzes/quiz1.html
UNIVERSITY OF WISCONSIN-MADISON
Computer Sciences Department | ||
CS 537
Spring 1996 | Bart Miller | |
Quiz #1
Wednesday, February 7 |
Initialization
int X = 0; | |
Process A
while (X == 0) { // do nothing } cout << "a"; |
Process B
cout << "b"; X = 1; |
Describe the output here:
|
Initialization
int X = 0; int Y = 0; | |
Process A
while (X == 0) { // do nothing } cout << "a"; Y = 1; Y = 0; cout << "d"; Y = 1; |
Process B
cout << "b"; X = 1; while (Y == 0) { // do nothing } cout << "c"; |
Describe the output here:
The output will be either:
|