NEW
Font size
WorksheetsQuiz Topic 3 STM101733 PSPD
Total questions: 20
Worksheet time: 10mins
What is the output of this program?
Program
int main( )
{
cout<<"Hi everybody";
return 0;
}
"Hi everybody"
Hi everybody"
Hi everybody
"Hi everybody
The process of creating a new variable without value
declaration
naming
instantiation
assigning
If originally x=2,y=0, and z=1, what is the value of x, y, and z after executing the following code?
if (x>y)
y=x;
else
z=x;
x=0 y=2 z=0
x=2 y=1 z=1
x=2 y=2 z=1
x=2 y=0 z=1
What is the only function all C++ programs must contain?
start( )
system( )
main( )
program( )
What does <= mean?
less than
greater than
less than or equal to
greater than or equal to
A list of instructions that enable a computer to perform a specific task is a...
Computer Program
Algorithm
Algorithm
Algorithm
Evaluate the following expressions to true or false
3!=4-1
true
false
A programmer is:
person who types
person who writes code and communicates instructions to a computer
person who types
person who types
Which of the following is NOT a comparison operator in C++ language?
>
=
<=
==
... point variables store decimal numbers (3.5, -5,123, 4.0, etc).
Integer
Float
Logical
Character
Which of the following is NOT a logical operator in C++ language?
&
||
&&
!
Evaluate the following expressions to true or false
5+1==6 || 8-1>4
True
False
Which command moves the shown text to the new line?
\r
\t
\n
\s
After running the following code, what will be the value of x?
y = 3; x = 5 * y;
3
5
15
0
Evaluate the following expressions to true or false
5 >= (1+6)-4
True
False
What punctuation is used to signal the beginning and end of code blocks?
-> and <-
{ }
BEGIN and END
( and )
Which of the following is a CORRECT comment?
*/comments*/
** Comment **
/* Comment */
{ Comment }
... variables store whole numbers (-4, 3, 51, etc).
Float
Logical
Integer
Character
What is the output of this program?
Program
int main( )
{
cout<<"Hello World!!!";
return 0;
}
"Hello World!!!"
Hello World!!
Hello World!!!
Hello World!!!"
What will the result of 'num' variable after execution of the following statements?
int num = 58;
num % = 11;
10
3
5
7
