NEW
Font size
WorksheetsProgaTest_ME1R
Total questions: 22
Worksheet time: 2hrs 50mins
Find the arithmetic operator
x
+
+y
&x
1. Specify the types of operator
Logical, Bitwise, Assignment, Relational
Mathematical, Bitwise, Arithmetic, Relational
Assignment, Bitwise, Arithmetic, Relational
Logical, Bitwise, Assignment, Relational
True
Folse
Logical operators always evaluated from
Right to left
Not sure
No difference
Left to right
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:
Comparison, logical, arithmetic
Logical, arithmetic, comparison
Arithmetic, comparison, logical
Arithmetic, logical, comparison
Precedence for Logical Operators
OR, NOT, AND
OR, AND, NOT
NOT, AND, OR
AND, OR, NOT
How many times the current loop will execute? for (int i = 0; i <= 5; i += 3);
2 times
3 times
Never
Infinite loop
There are two different ways to implement multi selections in C++ language. They are
Else – if and switch case
If… else and switch case
Else if
Not sure
What is an array?
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
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
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
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
A two-dimensional array represents data in the form of table with rows and columns
True
False
Nothing
All of them
Which statement of array is true?
Int foo[5]={10,20,30};
Int foo[]{10,20,30};
Int foo[3]={10,20,30};
Int foo[];
What are strings?
Strings are objects that represent sequences of characters
Strings are objects that represent sequences of pointers
Strings are objects that represent sequences of special words
Strings are objects that represent sequences of structures
In which data type we write text
String
Int
Float
double
Choose the right syntax to define a function
name [parameter1, parameter2]
type (parameters)
parameter1, parameter2(name)
type name(parameter1, parameter2)
A function can return more than one value
True
Folse
What are the three steps in using a function?
Definition, invocation, argument.
Prototype, argument, signature.
Definition, prototype, invocation.
The factorial function
if(n-1){return n*factorial(n-1);} else {return 1;}
n!=n*(n+1)!
n!=n-(n-1)! And 1!=1
n!=n/(n-1)! And 1!=1
write mpg() function prototype, that takes two type double arguments and returns a double
Float mpg(int a){ float b = 1; return b;}
Void mpg(){}
Double mpg(double a, double b)
Double mpg(int a, double b)
What is data structure?
is a group of data elements grouped together under one name.
is a group of data elements grouped together under two names.
is a set of some elements grouped together under value
is a group of data elements together with some name
Which of the following are themselves a collection of different data types?
String
Structure
Char
Integer
The data elements in structure are also known as what?
Objects
Data
Members
None of the above
What will be used when terminating a structure?
Brackets
Colon
Semicolon
Dot
