wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Recap Chapter 6, 7, 8

Total questions: 11

Worksheet time: 27mins

Name
Class
Date
1.

Best type of repetition control structures to be used to make a menu item?

a)

While loop

b)

If ...else

c)

Do...while loop

d)

For loop

2.

Display array according to the boxes for the statement below.
char string2[] = "Wonderful";

(a)  

3.

Which one of the syntax can read C-string with whitespaces?

a)

cin.getline(arrayName, size);

b)

getline(cin, variableName);

c)

cin >> VariableName;

d)

All of the above

4.

Please write the output for the code based on the picture.

(a)  

5.

Header file that used for character testing function.

Example: isupper, islower, isalpha

(a)  

6.

What type of dataType that can be used in array?

a)

int & string

b)

char & string

c)

int & double

d)

All kind of dataType

7.

Please write the output for the program as shown in the picture.

4 lines
8.

Does the output for the program code for best1 and best2 will be the same?

a)

Same

b)

Different

c)

Error

d)

None of the answer

9.

Does array definition below is valid or invalid?

const int VALUES = 7;

int days[VALUES];

a)

Valid

b)

Invalid

10.

Please read and analyze the program code carefully. You can either use Microsoft Visual Studio to run your code or just analyze the program code based on the picture. Please state the output of the program.

4 lines
11.

Write a simple code to make a character conversion from lowercase sentence into uppercase sentence.

4 lines