Lakshya Gupta
Quiz by , created more than 1 year ago

A simple and intuitive quiz on Relational Operators in C++

230
0
0
Lakshya Gupta
Created by Lakshya Gupta over 8 years ago
Close

Relational Operators in C++

Question 1 of 8

1

Operators which specify the relation between two variables by comparing them are known as?

Select one of the following:

  • Logical Operators

  • Relational Operators

  • Assignment Operators

  • Arithmetic Operators

Explanation

Question 2 of 8

1

How many relational operators are present in C++?

Select one of the following:

  • Five

  • Three

  • Six

  • Eight

Explanation

Question 3 of 8

1

What is '==' Operator known as?

Select one of the following:

  • Arithmetic operator

  • Equal Equal operator

  • Equal to operator

  • None of these

Explanation

Question 4 of 8

1

'Not equal to' operator is represented by what in C++?

Select one of the following:

  • !=

  • /=

  • Not =

  • \=

Explanation

Question 5 of 8

1

'Less than or equal to' is represented by what in C++?

Select one of the following:

  • =<

  • <=

  • =>

  • >=

Explanation

Question 6 of 8

1

What value is returned if the comparison of two variables is True?

Select one of the following:

  • 4

  • 0

  • 2

  • 1

Explanation

Question 7 of 8

1

How do you equate value of variable B to a variable A?

Select one of the following:

  • A=C

  • A==D

  • A=B

  • A==B

Explanation

Question 8 of 8

1

What would be the output of the following code?
int a=10,b=20;

if(a>b)
cout<<"a is greater"<<endl;

else
cout<<"b is greater"<<endl;

Select one of the following:

  • a is greater

  • b is greater

  • 20>10

  • None of these

Explanation