wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Fundamentals of Programming Prefinals

Total questions: 44

Worksheet time: 44mins

Name
Class
Date
1.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the yellow-highlighted blank only.

(a)  

2.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the green-highlighted blank only.

(a)  

3.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the cyan-highlighted blank only.

(a)  

4.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the pink-highlighted blank only.

(a)  

5.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the gray-highlighted blank only.

(a)  

6.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the violet-highlighted blank only.

(a)  

7.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the yellow-highlighted blank only.

(a)  

8.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the green-highlighted blank only.

(a)  

9.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the cyan-highlighted blank only.

(a)  

10.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the pink-highlighted blank only.

(a)  

11.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the grey-highlighted blank only.

(a)  

12.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the violet-highlighted blank only.

(a)  

13.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the yellow-highlighted blank only.

(a)  

14.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the green-highlighted blank only.

(a)  

15.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the cyan-highlighted blank only.

(a)  

16.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the pink-highlighted blank only.

(a)  

17.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the grey-highlighted blank only.

(a)  

18.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the violet-highlighted blank only.

(a)  

19.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the yellow-highlighted blank only.

(a)  

20.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the green-highlighted blank only.

(a)  

21.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the cyan-highlighted blank only.

(a)  

22.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the pink-highlighted blank only.

(a)  

23.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the grey-highlighted blank only.

(a)  

24.

Fill in the missing parts of the C++ program with the correct code. Provide the answer for the violet-highlighted blank only.

(a)  

25.

Write the most appropriate C++ operator

Increasing the value of a variable counter by 1.

(a)  

26.

  1. Write the most appropriate C++ operator.

  2. Checking if a variable age is greater than or equal to 18.



(a)  

27.

  1. Write the most appropriate C++ operator.

Adding the value of b to the value of a and store the res



(a)  

28.

  1. Write the most appropriate C++ operator.

  2. Checking if two variables, x and y, are equal in value.



(a)  

29.

  1. Write the most appropriate C++ operator.

  2. Checking if a number num is negative (less than zero).



(a)  

30.

  1. Write the most appropriate C++ operator.

  2. Calculating the remainder when dividend is divided by divisor.



(a)  

31.

  1. Write the most appropriate C++ operator.

  2. Checking if a person is eligible for a discount (age is over 65 OR is a member).



(a)  

32.

  1. Write the most appropriate C++ operator.

  2. Halving the value of a variable price.



(a)  

33.

  1. Write the most appropriate C++ operator.

  2. Checking if a value score is not equal to 100.



(a)  

34.

  1. Write the most appropriate C++ operator.

  2. Decreasing the value of a variable lives by 1.



(a)  

35.

  1. Write the most appropriate C++ operator.

  2. Checking if a value temperature is less than 0 or greater than 100



(a)  

36.

  1. Write the most appropriate C++ operator.

  2. Multiplying a variable total by a discount factor of 0.9 (10% discount).



(a)  

37.

  1. Write the most appropriate C++ operator.

  2. Checking if a number value is positive (greater than 0).



(a)  

38.

  1. Write the most appropriate C++ operator.

  2. Assigning the result of an expression (a + b) * c to a variable result.



(a)  

39.

  1. Write the most appropriate C++ operator.

  2. Checking if a person is an adult (age >= 18) AND has a valid driver's license.



(a)  

40.

  1. Write the most appropriate C++ operator.

  2. Squaring a number n (multiply it by itself).



(a)  

41.

  1. Write the most appropriate C++ operator.

  2. Checking if a value x is less than or equal to y.



(a)  

42.

  1. Write the most appropriate C++ operator.

  2. Adding 5 to a variable count in the most concise way.



(a)  

43.

  1. Write the most appropriate C++ operator.

  2. Checking if a Boolean variable isReady is false.



(a)  

44.

  1. Write the most appropriate C++ operator.

  2. Doubling the value of a variable salary.



(a)