NEW
Font size
S
M
L
XL
WorksheetsCh Coding Review
Total questions: 20
Worksheet time: 40mins
Name
Class
Date
1.
Calculations:
What will the output be in Ch?
2+3(4)
What will the output be in Ch?
2+3(4)
a)
5
b)
14
c)
20
d)
2
2.
Calculations:
What will the output be in Ch?
15-4*3
What will the output be in Ch?
15-4*3
a)
3
b)
33
c)
-28
d)
14
3.
Calculations:
What will the output be in Ch?
-12-4/2
What will the output be in Ch?
-12-4/2
a)
-14
b)
-8
c)
8
d)
-4
4.
Calculations:
What will the output be in Ch?
17/-2
What will the output be in Ch?
17/-2
a)
-8
b)
8.5
c)
8
d)
-8.5
5.
Calculations:
What will the output be in Ch?
2.5*4
What will the output be in Ch?
2.5*4
a)
10.0000
b)
100
c)
10
d)
100,000
6.
Programming Basics:
How should you save your files?
How should you save your files?
a)
InitialsProgramName.ch
b)
InitialsProgramName
c)
ProgramName
d)
ProgramName.ch
7.
Programming Basics:
What does the up arrow do in Ch?
What does the up arrow do in Ch?
a)
Get previous input
b)
Get previous output
c)
Edit current input
d)
Edit current output
8.
Programming Basics:
What does the left arrow do in Ch?
What does the left arrow do in Ch?
a)
Get previous input
b)
Get previous output
c)
Edit current input
d)
Edit current output
9.
Programming Basics:
What does the left arrow do in Ch?
What does the left arrow do in Ch?
a)
Get previous input
b)
Get previous output
c)
Edit current input
d)
Edit current output
10.
Variables:
What is a Double?
What is a Double?
a)
Integer
b)
Repeated Integer
c)
Repeated Real Number
d)
Decimal
11.
Declaring Variables:
What is the correct order to declare an integer as 5?
What is the correct order to declare an integer as 5?
a)
i=5; int i;
b)
i=5.0;
c)
int i; i=5;
d)
double i; i=5
12.
What does this command do?
showvar
showvar
a)
Shows all variables
b)
Removes all variables
c)
Clears Screen
d)
Switch between different programs
13.
What does this command do?
remvar
remvar
a)
Shows all variables
b)
Removes all variables
c)
Clears Screen
d)
Switch between different programs
14.
What does this command do?
cls in windows or clear on apple
cls in windows or clear on apple
a)
Shows all variables
b)
Removes all variables
c)
Clears Screen
d)
Switch between different programs
15.
What does this command do?
Alt+Tab
Alt+Tab
a)
Shows all variables
b)
Removes all variables
c)
Clears Screen
d)
Switch between different programs
16.
What does truncating a decimal mean?
a)
Round the decimal up
b)
Round the decimal down
c)
Round to the nearest whole number
d)
Remove the places after the decimal
17.
What does this function do?
printf
printf
a)
computes the math problem
b)
prints a string of letters, words, and or numbers
c)
prints file
d)
prints the letter f
18.
Conversion Specifier:
%d
%d
a)
Used to replace an integer in a printf command.
b)
Used to replace a decimal in a printf command.
19.
How do you add an indent to your printf functions?
a)
/n
b)
\n
20.
What will this output?
printf("I have $%.2lf dollars.\n", 1.2346);
printf("I have $%.2lf dollars.\n", 1.2346);
a)
I have $1.23.
b)
I have $1.2346.
c)
Error
d)
I have $1.000000.
Reset
