wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Final Exam Revision (Trial)

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

Choose the RIGHT data-type used in C++ to store Employee Identification Card
for “CC00123".

a)

A. string

b)

B. boolean

c)

C. character

d)

D. integer

2.

Which of the following is the keyword in C++?

a)

A. then

b)

B. number

c)

C. case

d)

D. rational

3.

Which of the following term is equivalent with the != operator?

a)

A. is equal

b)

B. is not equal

c)

C. greater than

d)

D. less than

4.

What is the purpose of = operator in C++ programming?

a)

A . To assign a value to a
variable

b)

B. To compare two values for equality

c)

C. To declare a function

d)

D. To perform arithmetic addition

5.

What is the suitable data type of the Ringgit = 5 . 1 ?

a)

A. integer

b)

B. character

c)

C. float

d)

D. string

6.

What is the purpose of keyword const in C++ programming?

a)

A. The value declared in the
program cannot be changed
throughout the program.

b)

B. The memory location can be
referred using the variable name and
this location is used to store the value
of the variable.

c)

C. The value declared in the program
can be changed throughout the
program.

d)

D. Special character constant is a nonprinting character, known as Escape
Sequence.

7.

Choose the CORRECT equivalent combined assignment operator in C++ for
y=y+(m*x+c).

a)

A. y*=(m*x)+c

b)

B. y+=m*x+c

c)

C. y+=m*{x+c)

d)

D. y=+{m)*x+c

8.

What is the operator used to write compound conditional expression in
selection and iteration control structure?

a)

A. assignment operator

b)

B. arithmetic operator

c)

C. logical operator

d)

D. conditional operator

9.

Which type of control structure that executes some statement in the program
conditionally?

a)

A. looping

b)

B. selection

c)

C. repetition

d)

D. sequence

10.

Which type of selection is used when we have to choose decision based on
more than one conditions or criteria?

a)

A. single

b)

B. double

c)

C. couple

d)

D. multiple

11.

What is the CORRECT operator must be placed at the beginning and ending of
the block for more than one statement in if block statement?

a)

A. braces { }

b)

B. brackets [ ]

c)

C. insertion «

d)

D. parentheses ( )

12.

Which statement can be used as an option of switch statement in C++
programming?

a)

A. single if

b)

B. double if

c)

C. nested if

d)

D. multiple if

13.

What is the suitable statement to identify looping in C++ programming?

a)

A. repeat the specific line of
codes

b)

B. selecting the specific line of codes

c)

C. ending to specific branch of
program

d)

D. jumping to specific branch of
program

14.

What type of loop is controlled by the value calculated in the loop body.

a)

A. flag controlled

b)

B. event controlled

c)

C. counter controlled

d)

D. sentinel controlled

15.

Which of the following reserved word is used in iteration structure?

a)

A. if

b)

B. int

c)

C. for

d)

D. case

16.

Which of the following is related with void function in C++ programming?

a)

A. The void function is contain data
type in the header function.

b)

B. This function do not use
return statement to return a value.

c)

C. The void function is same with the
function prototype.

d)

D. This function return a value of a
specific data type using the return
statement.

17.

What is data type of parameter in the header below function? int convert (float
a, float b)

a)

A. int

b)

B. convert

c)

C. float

d)

D. a , b

18.

Choose the CORRECT function prototype in C++ for float area (int W,int H);

a)

A. float area (int);

b)

B. float area();

c)

C. float area (int,int);

d)

D. float area (W,H);

19.

What is pre-define function used to calculate square root of a number?

a)

A. srqt(n)

b)

B. sqrt(n)

c)

C. root(n)

d)

D. number(n)

20.

What is the symbol used to indicate reference parameter?

a)

A. #

b)

B. &

c)

C. !

d)

D. no symbol

21.

How to initialize arrays during declaration?

a)

A. Cannot be initialize arrays.

b)

B. It is necessary to specify the size of
memory.

c)

C. Bracket must be include following
the array name.

d)

D. Size must be determined by
the number if initial values in
the braces.

22.

Which of the following gives the memory address of the first element in array?

a)

A. array[ ];

b)

B. array[0];

c)

C. array(1);

d)

D. array(0);

23.

Which of the following is a VALID array declaration?

a)

A. result [ 3 = {50, 30, 20, 15, 5);

b)

B. result [ ] = (50, 30, 20, 15, 5);

c)

C. result[ ] = [50, 30, 20, 15, 5];

d)

D. result[ ] = {50},{30},{20},{15},{5 >;

24.

What is the MOST suitable declaration to store name of FIFTY{50)students in
an array?

a)

A. int name[50];

b)

B. char name[50];

c)

C. float name[50];

d)

D. string name[50];

25.

Refer to the following statement: float point[]={1.1, 1.3, 2.5, 2.7}; What is the
value point[2}?

a)

A. 1.1

b)

B. 1.3

c)

C. 2.5

d)

D. 2.7