Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

QUIZ I - Programming Fundamentals

Total questions: 25

Worksheet time: 21mins

Name
Class
Date
1.

Voids

a)

A statement that returns a value

b)

A statement that doesn't return a value

c)

A function that return a value

d)

A function that doesn't return a value

2.

iostream

a)

Displays output from the screen and input from the keyboard

b)

Has all the math equations

c)

Counts the time

d)

Checks if the code has a function

3.
Another way of saying "otherwise"
a)
Programming
b)
Parameters
c)
Else
d)
Increment
4.

What does <= mean?

a)

less than

b)

greater than

c)

less than or equal to

d)

greater than or equal to

5.

Which of the following is a correct comment?

a)

*/ Comments */

b)

** Comment **

c)

/* Comment */

d)

{ Comment }

6.
A list of instructions that enable a computer to perform a specific task is a...
a)
Computer Program
b)
Algorithm
c)
Machine Code
d)
Binary Code
7.
Which command moves the shown text to the next line?
a)
\t
b)
\n
c)
\r
d)
\s
8.
What is the output of this program?
Program
int main()
{
cout<<"Hi everybody";
return 0;
}
a)
"Hi everybody"
b)
Hi everybody"
c)
Hi everybody
d)
"Hi everybody
9.
What is the output of the program?
a)
Ict Profi
b)
IctProfi
c)
Ict
Profi
d)
Profi
Ict
10.
What sign is used to end the code sentence ?
a)
,
b)
.
c)
:
d)
;
11.
How do we declare(present) a variable ?
a)
int  a;
b)
int  a
c)
int ;
d)
a ;
12.

Which one is the example of the data types int?

a)

A

b)

28.02

c)

19

d)

aliya@yahoo.com

13.

What is the function of % operator?

a)

add

b)

devide

c)

substract

d)

remainder

14.

What is the output for this program?

a)

5

b)

0

c)

20

d)

3

15.

What is the output for this program?

a)

1

b)

2

c)

3

d)

5

16.

What is the output of this program?

a)

Welcome Ali.

Enjoy your Day.

b)

Welcome Ali.

c)

Enjoy your day.

d)

Welcome Ali.Enjoy your day.

17.

Find an integer constant.

a)

3.145

b)

34

c)

"125"

d)

None of the above

18.

C++ is an object Oriented Language

a)

TRUE

b)

FALSE

19.
Before a computer can understand a program it must be...
a)
Translated into its machine code.
b)
Translated into a high level language.
c)
Translated into a low level language.
d)
Converted into binary.
20.
Which of the following is initializing a variable that allows only whole numbers? 
a)

string house;

b)
int house;
c)
array house;
d)
double house;
21.
After running the following code, what will be the value of x?
y = 3;
x = 5 * y;
a)
3
b)
5
c)
15
d)
0
22.
Which of the following is initializing a variable that allows words? 
a)

string house;

b)
int house;
c)
array house;
d)
double house;
23.
Value either false or true.
a)
Integer
b)
Double
c)
Boolean
d)
String
24.
Non-numerical and is used to store characters and words.
a)
Integer
b)
Double
c)
Boolean
d)
String
25.
A person who writes code and communicates instructions to a computer.
a)
Code
b)
Programmer
c)
Command
d)
Program