Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CPP SHS

Total questions: 45

Worksheet time: 2hrs 48mins

Name
Class
Date
1.

If the user inputs an income of 10, what will be the output of this code?

a)
  • Sales Tax

b)
  • Property Tax

c)
  • Income Tax

d)
  • None of the above

2.

Is there any issue with this code? (True/False)

a)

True

b)

False

3.

If the user inputs 8, what will be the output of this code?

a)
  • August

b)
  • September

c)
  • October

d)
  • Invalid month number

4.

What is the output of the following code?

Original Amount: $ ?

Discount Rate: ?

Discounted Amount: $?

(a)  

5.

If the Input for Credit Card balance is 899, what will be the output?

(a)  

6.

if the input from the number of days the car rented is 15, and if the input from the type of car is Standard then what will be the Rental Cost?

(a)  

7.

what will be the Total Bill Amount If the Selected Package is A and number of hours used is 100

(a)  

8.

What will be the Estimated Cost if the number of attendees is 55 and

the event type is Corporate?

(a)  

9.

what will be the Discount Amount if purchase amount is $585

and customer's membership status Premium



(a)  

10.

What will be the Promotion Status if employee's performance rating is 4



(a)  

11.

If the user inputs 82, what will be printed?

(a)  

12.

If the user enters 5, what is the output?

(a)  

13.

If the input is 39.2, what will be displayed?

(a)  

14.

If age = 17, what is the output?

(a)  

15.

Simple Interest Calculator
What will be printed as the result?

(a)  

16.

Number Comparison
If inputs are 12 and 12, what will be the output?

(a)  

17.

Average of Three Numbers

If the inputs are 10 20 30, what is the output?

(a)  

18.

Question:
Why does this code print “Eligible to vote” even when age is not 18?

4 lines
19.

Question:
Why does this code produce an error?

4 lines
20.

Question:
What is wrong with this code?

4 lines
21.

Question:
What is the logic error?

4 lines
22.

Question:
Why does this code fail to compile?

4 lines
23.

Question:
What is the logic problem with the output?

4 lines
24.

Question:
What will be displayed?

(a)  

25.

Question:
Predict the output.

(a)  

26.

Question:
Predict the output.

(a)  

27.

Question:
What is the output?

(a)  

28.

Question:
What will be displayed?

(a)  

29.

Question:
Predict the output.

(a)  

30.

Question:
What will be printed?

(a)  

31.

Question:
Predict the output.

(a)  

32.

Question:
What will be displayed?

(a)  

33.

Question:
Predict the output.

(a)  

34.

Question:
What is the output?

(a)  

35.

Question:
Predict the output.

(a)  

36.

Question:
What will be displayed?

(a)  

37.

Question:
What will be printed?

(a)  

38.

Question:
Predict the output.

(a)  

39.

Question:
Predict the output.

(a)  

40.

Question:
Predict the output.

(a)  

41.

Question:
What is the output?

(a)  

42.

Question:
Predict the output.

(a)  

43.

Question:
Predict the output.

(a)  

44.

Question:
What will be displayed?

(a)  

45.

Question:
Predict the output.

(a)