Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Midterm Exam - CP201

Total questions: 50

Worksheet time: 43mins

Name
Class
Date
1.
What is used to connect the flowchart symbols together?
a)
Rectangles
b)
Lines
c)
Arrows
d)
Patterns
2.

Data sent from a Computer is called

a)

Input

b)

Output

c)

Process

3.
What does this symbol represent?
a)
Start
b)
Sub
c)
Decision
d)
Process
4.
What is the purpose of a flowchart?
a)
To plan the program before it is made
b)
Because it is easier
5.
What is this symbol used for in a flowchart?
a)
A decision/question
b)
A task to carry out
6.
What symbol do flowcharts begin with?
a)
oval
b)
parallelogram
c)
rectangle
d)
diamond
7.
What is the name of this symbol in a flowchart?
a)
Input
b)
Output
c)
Decision/Question
d)
Process
8.
What does this shape represent?
a)
Input/Output
b)
Decision
c)
Process
d)
Start/Stop
9.
Can this shape be used for both Start and Stop?
a)
Yes
b)
No
10.
What is the Output if the user enters:
Yes
a)
Leave umbrella at home
b)
Take an umbrella
11.
What is the Output if the temperature is:
19
a)
Below Freezing
b)
Above Freezing
12.
What is the Output if the temperature is:
19
a)
Below Freezing
b)
Above Freezing
13.
What is the Output if the temperature is:
19
a)
Below Freezing
b)
Above Freezing
14.
The process of creating a new variable without value
a)
declaration
b)
naming
c)
instantiation
d)
assigning
15.

What does <= mean?

a)

less than

b)

greater than

c)

less than or equal to

d)

greater than or equal to

16.

What is the only function all C++ programs must contain?

a)

start()

b)

system()

c)

main()

d)

program()

17.

What punctuation is used to signal the beginning and end of code blocks?

a)

{ }

b)

-> and <-

c)

BEGIN and END

d)

( and )

18.

Which of the following is a correct comment?

a)

*/ Comments */

b)

** Comment **

c)

/* Comment */

d)

{ Comment }

19.
The process of creating a new variable without value
a)
declaration
b)
naming
c)
instantiation
d)
assigning
20.

What does <= mean?

a)

less than

b)

greater than

c)

less than or equal to

d)

greater than or equal to

21.
Which command moves the shown text to the next line?
a)
\t
b)
\n
c)
\r
d)
\s
22.
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
23.
What is the value of the missing input? 
a)
25
b)
30
c)
74
d)
26
24.
What is the value of the missing output?
a)
8
b)
6
c)
4
d)
12
25.

What should be considered when designing an algorithm?

a)

If there is more than one way of solving the problem

b)

If the correct hardware is being used

c)

If the correct software is being used

26.

What are the two main ways that algorithms can be designed?

a)

Images or videos

b)

In pseudocode or as a flowchart

c)

By hardware or software

27.

What are the two main ways that algorithms can be designed?

a)

Images or videos

b)

In pseudocode or as a flowchart

c)

By hardware or software

28.

What is pseudocode?

a)

A way of describing a set of instructions in text form

b)

A specific programming language that all computers use

c)

A diagrammatic representation of a set of instructions

29.

What is a flowchart?

a)

A flowchart is a text-based way of designing an algorithm

b)

A flowchart is a specific programming language

c)

A flowchart is a diagram that represents a set of instructions

30.

What is pseudocode?

a)

A way of describing a set of instructions in text form

b)

A specific programming language that all computers use

c)

A diagrammatic representation of a set of instructions

31.

What is the symbol for a decision in a flowchart?

a)

A parallelogram

b)

A diamond

c)

A circle

32.

What is important to remember when designing an algorithm?

a)

whether to use a flowchart or pseudocode

b)

the instructions are in the correct order

c)

that it must be easy to read

33.

A boolean is...

a)

A whole number

b)

A number with a decimal part

c)

Letters, numbers or punctuation

d)

True or False

34.

An integer is...

a)

A whole number

b)

A number with a decimal part

c)

Letters, numbers or punctuation

d)

True or False

35.

A real is...

a)

A whole number

b)

A number with a decimal part

c)

Letters, numbers or punctuation

d)

True or False

36.

A string is...

a)

A whole number

b)

A number with a decimal part

c)

Letters, numbers or punctuation

d)

True or False

37.

The best data type for an age is...

a)

integer

b)

real

c)

string

d)

boolean

38.

The best data type for a name is...

a)

integer

b)

real

c)

string

d)

boolean

39.

The best data type for an average is...

a)

integer

b)

real

c)

string

d)

boolean

40.

Algorithm is a

a)

Step by step procedure

b)

difficult procedure

c)

complex

d)

hard steps

41.

Flowchart are ____________________________ in nature.

a)

Easy

b)

Simple

c)

Complex

d)

Hard

42.

______________________ is a pictorial representation of steps.

a)

Algorithm

b)

Flowchart

c)

Connectors

d)

Flowlines

43.

(a)   are used to connect the boxes.

44.

We use different boxes in

a)

steps

b)

flowchart

c)

algorithm

d)

quiz

45.

Flowcharts are from

a)

Left

b)

Right

c)

Bottom

d)

Top to bottom

46.

Choose a right C Statement.

a)

Loops or Repetition block executes a group of statements repeatedly.

b)

Loop is usually executed as long as a condition is met.

c)

Loops usually take advantage of Loop Counter

d)

All the above.

47.

What is the output of C Program.?

int main()

{

int a=5;

while(a >= 3);

{

printf("RABBIT\n");

break;

}

printf("GREEN");

return 0;

}

a)

GREEN

b)

RABBIT GREEN

c)

RABBIT is printed infinite times

d)

None of the above

48.

What is the output of C Program.?

int main()

{

int a=25;

while(a <= 27)

{

printf("%d ", a);

a++;

}

return 0;

}

a)

25 25 25

b)

25 26 27

c)

27 27 27

d)

Compiler error

49.

What is the output of C Program.?

int main()

{

int a=32;

do

{

printf("%d ", a);

a++;

}

while(a <= 30);

return 0;

}

a)

32

b)

33

c)

30

d)

No Output

50.

What is the output of C Program.?

int main()

{

int a=32;

do

{

printf("%d ", a);

a++;

if(a > 35)

break;

}

while(1);

return 0;

}

a)

No Output

b)

32 33 34

c)

32 33 34 35

d)

Compiler error