0% found this document useful (0 votes)
12 views5 pages

MCQ Programming Practice Questions

dbbdbdbd

Uploaded by

Gizmo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views5 pages

MCQ Programming Practice Questions

dbbdbdbd

Uploaded by

Gizmo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

MCQ Programming Self Practice

Question 1

What is the output of the program on line 13


when the input on line 10 is “tomorrow”?

a. 13
b. 10
c. 9
d. 11

Practice

Write your answer in the box below

Question 2

Which line in the program will incur a warning


message?

a. 14
b. 15
c. 16
d. No warning message will appear

Practice

Write your answer in the box below


Question 3

Assume a=12, b=8, c=6.

After the execution of the code (line 8 to 16),


what is the result of a+=b?

a. 18
b. 19
c. 36
d. 27

Practice

Write your answer in the box below

Question 4

Which line will most likely cause a warning


message when run the program?

a. 9
b. 11
c. 12
d. 14

Practice

Write your answer in the box below


Question 5

What is the value of a on line 15?

a. 2
b. 1
c. 0
d. 4

Practice

Write your answer in the box below

Question 6

What is the binary representation of a on line 8?

a. 01111
b. 01100
c. 00011
d. 00111

Practice

Write your answer in the box below


Question 7

Which line(s) contain syntax error?

a. line 7 and 11
b. line 8 and 14
c. line 6 and 17
d. line 11 only

Practice

Write your answer in the box below

Question 8

Refer to question 7, if the syntax error(s) of the


program is/are fixed, what will be the output of
the program if input is 0 and 2.5 for a,b
respectively?

a. 11.5
b. 11.50
c. 1.5
d. 1.50

Practice

Write your answer in the box below


Question 9

What is the output of the program?

a. -1-21
b. -231
c. -23
d. -1-22

Practice

Write your answer in the box below

Question 10

Refer to question 9 program, add { on line 13 and


remove { on line 17. What is the output of the
program now?

a. -1-21
b. -231
c. -232
d. -1-22

Practice

Write your answer in the box below

Need help?
Book appointment for online
consultation

You might also like