wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

programming fundamental 1

Total questions: 14

Worksheet time: 4mins

Name
Class
Date
1.

The following is not true about variable names

a)

They must be descriptive

b)

They must be in capital letters

c)

They can’t start with numbers or contain spaces

d)

They point to memory locations

2.

This variable type can only have True or False values

a)

Boolean

b)

Integer

c)

String

d)

Character

3.
Where do we write the codes?
a)
1
b)
2
c)
3
d)
4
4.
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
5.
What is the output of the program?
a)
Ict Profi
b)
IctProfi
c)
Ict
Profi
d)
Profi
Ict
6.
Which one has  correct codes  to calculate your age?
Note : Your birth year will be int the birth variable
a)
cout << "Your age is equel to "<<2017-birth;
b)
cout << "Your age is equel to "<<2017-birth
c)
cout << "Your age is equel to 2017-birth";
d)
cout << "Your age is equel to "<<birth;
7.
What sign is used to end the code sentence ?
a)
,
b)
.
c)
:
d)
;
8.
How do we declare(present) a variable ?
a)
int  a;
b)
int  a
c)
int ;
d)
a ;
9.
Which code line is not correct in calculator program?
a)
2
b)
3
c)
1
d)
4
10.

The value 132.54 can be represented using which data type?

a)

double

b)

void

c)

int

d)

bool

11.

Which of the following is a correct comment?

a)

*/ Comments */

b)

** Comment **

c)

/* Comment */

d)

{ Comment }

12.
Which command moves the shown text to the next line?
a)
\t
b)
\n
c)
\r
d)
\s
13.
A programmer is:
a)
person who writes code and communicates instructions to a computer
b)
person who types
c)
person who studies computers
d)
error or mistake in your code
14.
... point variables store decimal numbers (3.5, -5,123, 4.0, etc). 
a)
Float
b)
Integer
c)
Logical
d)
Character