Font size
WorksheetsC++ ECE Q1
Total questions: 55
Worksheet time: 41mins
What is the output of below C++ program?
Hi
Bye
HiBye
Compilation Error
What following operator is called
?: in C++?
Scope Resolution Operator
Conditional Operator
Ternary Operator
if else o/p
11
10
Error
0
Error
5 times
4 times
6 times
10
11
Compilation Error
Linking Error
//What is the value of a in below C++ program?
int main()
{
int a, b=20;
a = 90/b;
return 0;
}
4.5
4.0
4
Compilation Error
10
11
12
Error
Which of the following is used for comments in C++?
/* comment */
// comment */
// comment
both // comment or /* comment */
111011
111111
101011
101010
One
Compilation Error
Default
OneTwoThreeDefault
Hello
Bye
Undefined
Compilation Error
FiveSix
Five
Six
None of these
Equal
EqualEqual
EqualNotEqual
NotEqual
1010
10
infinitely print 10
compile time error
What will be the result of 10 / 3 in C++ when both operands are integers?
3.33
3
0
4
Which of these is not a relational operator?
<=
!=
>=
&
Which of these is a correct example of the increment operator in C++?
a++
++a
a+=1
All of the above
Which of the following is the correct syntax for the ternary operator in C++?
condition : expression1 ? expression2
expression1 ? condition : expression2
condition ? expression1 : expression2
expression1 : condition ? expression2
What will be the output of the following code:
int a = 5, b = 3;
cout << (a < b ? a : b);
5
3
0
Error
What is the output of the following code?
int x = 10;
if (x > 5)
cout << "Hello";
Hello
Error
Nothing
10
Output?
35
20
25
30
Output?
1000
11
1010
1001
Output?
749735
736749
367497
367597
What are Binary Operators?
Operators that work on two operands
Operators that work on one operand
Operators that work on three operands
There is no such thing as Binary Operators
What are Ternary Operators?
Operators that work on three operands
Operators that work on one operand
Operators that work on two operands
There is no such thing as Ternary operators
What does this unary operator mean? : ++
It is the increment operator, usage: x++ , output if x=10: 11
It is the decrement operator, usage x--, output if x=10: 9
It is the logical 'Not' operator, usage !(x), output if x=10: True
What does this unary operator mean? --
It is the decrement operator, usage: X--, output if x=10 : 9
It is the increment operator, usage: x++, output if x=10 : 11
It is the logical 'Not' operator, usage: !(X), output if x=10: True
What does this unary operator mean? !
It is the logical 'Not' operator, usage : !(X), output of x=10 : True
It is the increment operator, usage : X++, output if x=10 : 11
It is the decrement operator, usage : X--, output if x=10 : 9
What does this arithmetic Binary operator mean? +
Addition
Multiplication
Subtraction
Remainder
What does this arithmetic Binary operator mean? -
Subtraction
Addition
Multiplication
Division
What does this arithmetic binary operator mean? *
Multiplication
Division
Addition
Subtraction
What does this arithmetic binary operator mean? /
Division
Multiplication
Fraction
Subtraction
What does this arithmetic binary operator mean? %
Remainder
Percentage
Subtraction
Multiplication
What does this relational binary operator mean? ==
Equal to
Greater than
Less than
Greater than or equal to
What does this relational binary operator mean? >
Greater than
Less than
Greater than or equal to
Less than or equal to
What does this relational binary operator mean? <
Less than
Greater than
Less than or equal to
Greater than or equal to
What does this relational binary operator mean? >=
Greater than or equal to
Less than or equal to
greater than
less than
What does this relational binary operator mean? <=
Less than or equal to
Greater than or equal to
Greater than
Less than
What does this relational binary operator mean? !=
Not equal
Wow! it equals to
Less than or equal to
Greater than or equal to
Which is an example of a ternary operator?
(condition)?(if_true):(If_false)
?(if_true):(If_false)(condition)
(condition)(condition)(if_true):(If_false)
2 WORDS
(a)
(Time: 20s) Guess the word which fits all 4 images.(6 letters)
_ _ _ _ _ _
(a)
(Time: 20s) Guess the word which fits all 4 images.(8 letters)
_ _ _R L _ _ _
(a)
(Time: 20s) Guess the word which fits all 4 images.(5 letters)
F _ _ _ _
(a)
(Time: 20s) Guess the word which fits all 4 images.(9 letters)
_ _ _ _ _ T _ _ _
(a)
(Time: 20s) Guess the word which fits all 4 images.(4 letters)
_ _ _ _
(a)
(Time: 30s) Spot all the differences between the 2 images.
Mention the number of differences in the answer.
Eg.: 3 or three
(a)
(Time: 20s) Spot all the differences between the 2 images.
Mention the number of differences in the answer.
Eg.: 3 or three
(a)
(Time: 20s) Solve this.
(a)
(Time: 10s) Pick the odd one out
A
B
C
D
(Time: 20s) Guess the Disney movie name(3 words)
_ _ _ / _ _ _ _ _ _ / _ _ _ _
(a)
(Time: 10s) Guess the ice cream parlor name (2 words)
(a)
(Time: 10s) Guess the Disney movie name.(1 word)
(a)
(Time: 10s) Guess the hidden word
(a)
(Time: 5s) Which is correct logo A or B ?
(a)
