wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Programming with C++

Total questions: 10

Worksheet time: 6mins

Name
Class
Date
1.
Where do we write the codes?
a)
1
b)
2
c)
3
d)
4
2.
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
3.
What is the output of the program?
a)
Ict Profi
b)
IctProfi
c)
Ict
Profi
d)
Profi
Ict
4.
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;
5.
What sign is used to end the code sentence ?
a)
,
b)
.
c)
:
d)
;
6.
How do we declare(present) a variable ?
a)
int  a;
b)
int  a
c)
int ;
d)
a ;
7.
What codes should we use to repeat the code more than 1 time?
a)
While
b)
If
c)
Motor
d)
Int
8.
What do we use to control the number of repetition in while structure? 
a)
Counter
b)
Programmer
c)
me
d)
Officer
9.
Which code line is not correct in calculator program?
a)
2
b)
3
c)
1
d)
4
10.
How many times will it repeat displaying the text(I deserve a good education) on the screen?
a)
4
b)
5
c)
6
d)
infinite