Computer Programming 1 - 1 Question Preview (ID: 18068)


Computer Programming 1 - Part 1. TEACHERS: click here for quick copy question ID numbers.

What value will be stored in x when this code is executed? float x = 5.2 + 7.4;
a) 12.6
b) 12
c) 13
d) 13.6

What value will be stored in x when this code is executed? int x = 5.2 + 7.4;
a) 12
b) 12.6
c) 13
d) 13.6

Which of the following properly creates and initializes an int variable?
a) int x = 5
b) int 5 = x
c) x = 5
d) 5 = x

Which of the following data types is used to track currency?
a) double
b) int
c) string
d) boolean

Which of the following data types is used to represent an On or Off state?
a) boolean
b) char
c) int
d) double

Which is NOT a valid variable name?
a) 1int
b) int1
c) Xint
d) INTE

Which is an example of camelCase?
a) iAmError
b) IAmError
c) IAMERROR
d) iamerror

A logic error occurs:
a) When the program crashes unexpectedly
b) When the program does not give an expected result
c) When compiling the code fails
d) When the program wants to

A runtime error occurs:
a) When the program crashes unexpectedly
b) When compiling the code fails
c) When the program does not give an expected result
d) When the program wants to

A syntax error occurs:
a) When compiling the code fails
b) When the program crashes unexpectedly
c) When the program does not give an expected result
d) When the program wants to

Play Games with the Questions above at ReviewGameZone.com
To play games using the questions from above, visit ReviewGameZone.com and enter game ID number: 18068 in the upper right hand corner or click here.

TEACHERS / EDUCATORS
Log In
| Sign Up / Register