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

1) The three primary control structures are int, double, and char.
2) Repetition structures choose one of several alternatives based on a condition.
3) Sequential execution is the default control structure.
4) The following program fragment exchanges the values of x and y if x is less than y initially.
```
if (x < y) {
y = x;
x = y;
}
```
5. If the value of flag is 2, the following switch statement will cause a run-time error.
```
switch (flag) {
case 0:
cout << "Program execution successful";
break;
case 1:
cout << "Error in data format -- program exiting.";
}
```

1) F
2) F
3) T
4) F
5) F

Computer Science & Information Technology

You might also like to view...

You CANNOT add favorite folder locations to the Save As page

Indicate whether the statement is true or false

Computer Science & Information Technology

The bar, located below the Ribbon, that displays the active cell's content is the ________ bar

A) formula B) display C) data D) name

Computer Science & Information Technology