NEW
Font size
WorksheetsCH. 2 - Concept of Comp. Problem Solving - Review
Total questions: 10
Worksheet time: 5mins
What is a constant in programming?
A value that changes frequently during execution
A fixed value that does not change during execution
A memory location that stores temporary values
A special type of variable that can store multiple values
Which of the following is NOT a rule for naming variables?
The name must start with a letter
Spaces can be used within the name
The name should represent the variable’s purpose
Symbols like dashes (-) should be avoided
Which of the following is a numeric data type?
"Hello"
123.45
True
#&$%&
Which data type is used for logical decision-making?
Character
Numeric
Boolean
String
Which of the following is an example of a function?
length(string)
string + string
a > b
= (equal sign)
Which of these is NOT a type of function?
Mathematical
Statistical
Physical
Utility
Which of the following is a relational operator?
+
&&
>=
%
What happens to a variable’s value when a new value is assigned to it?
The new value is added to the previous one
The previous value is erased and replaced with the new value
Both values are stored together in memory
The computer creates a new variable for the new value
What does the term "hierarchy of operations" refer to in programming?
The way memory is allocated for variables
The order in which operators are executed in an expression
The way functions are defined in a program
The organization of data types in a system
Which of the following is an example of a statistical function?
sqrt(x)
length("Hello")
max(10,20)
abs(-5)
