wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

ProgaTest_ME1R

Total questions: 22

Worksheet time: 2hrs 50mins

Name
Class
Date
1.

Find the arithmetic operator

a)

x

b)

+

c)

+y

d)

&x

2.

1.              Specify the types of operator

a)

Logical, Bitwise, Assignment, Relational

b)

Mathematical, Bitwise, Arithmetic, Relational

c)

Assignment, Bitwise, Arithmetic, Relational

d)

Logical, Bitwise, Assignment, Relational

3.
a)

True

b)

Folse

4.

Logical operators always evaluated from

a)

Right to left

b)

Not sure

c)

No difference

d)

Left to right

5.

When an equation uses more than one type of operator then the order of precedence has to be established with the different types of operators:

a)

Comparison, logical, arithmetic

b)

Logical, arithmetic, comparison

c)

Arithmetic, comparison, logical

d)

Arithmetic, logical, comparison

6.

Precedence for Logical Operators

a)

OR, NOT, AND

b)

OR, AND, NOT

c)

NOT, AND, OR

d)

AND, OR, NOT

7.

How many times the current loop will execute? for (int i = 0; i <= 5; i += 3);

a)

2 times

b)

3 times

c)

Never

d)

Infinite loop

8.

There are two different ways to implement multi selections in C++ language. They are

a)

Else – if and switch case

b)

If… else and switch case

c)

Else if

d)

Not sure

9.

What is an array?

a)

An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier

b)

An array is a series of elements of the different type placed in contiguous memory locations that can be individually referenced by adding an index to a unique

c)

An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by multiplying an index to a unique identifier

d)

An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a same identifier

10.

A two-dimensional array represents data in the form of table with rows and columns

a)

True

b)

False

c)

Nothing

d)

All of them

11.

Which statement of array is true?

a)

Int foo[5]={10,20,30};

b)

Int foo[]{10,20,30};

c)

Int foo[3]={10,20,30};

d)

Int foo[];

12.

What are strings?

a)

Strings are objects that represent sequences of characters

b)

Strings are objects that represent sequences of pointers

c)

Strings are objects that represent sequences of special words

d)

Strings are objects that represent sequences of structures

13.

In which data type we write text

a)

String

b)

Int

c)

Float

d)

double

14.

Choose the right syntax to define a function

a)

name [parameter1, parameter2]

b)

type (parameters)

c)

parameter1, parameter2(name)

d)

type name(parameter1, parameter2)

15.

A function can return more than one value

a)

True

b)

Folse

16.

What are the three steps in using a function?

a)

Definition, invocation, argument.

b)

Prototype, argument, signature.

c)

Definition, prototype, invocation.

17.

The factorial function

a)

if(n-1){return n*factorial(n-1);} else {return 1;}

b)

n!=n*(n+1)!

c)

n!=n-(n-1)! And 1!=1

d)

n!=n/(n-1)! And 1!=1

18.

write mpg() function prototype, that takes two type double arguments and returns a double

a)

Float mpg(int a){ float b = 1; return b;}

b)

Void mpg(){}

c)

Double mpg(double a, double b)

d)

Double mpg(int a, double b)

19.

What is data structure?

a)

is a group of data elements grouped together under one name.

b)

is a group of data elements grouped together under two names.

c)

is a set of some elements grouped together under value

d)

is a group of data elements together with some name

20.

Which of the following are themselves a collection of different data types?

a)

String

b)

Structure

c)

Char

d)

Integer

21.

The data elements in structure are also known as what?

a)

Objects

b)

Data

c)

Members

d)

None of the above

22.

What will be used when terminating a structure?

a)

Brackets

b)

Colon

c)

Semicolon

d)

Dot