Introduction to Computing MCQs with Answers
Practice important Introduction to Computing MCQs with answers and explanations.
Multiple Choice Questions
Q1801: What does the relational operator <= mean in C++?
- A: Less than or equal to
- B: Greater than or equal to
- C: Equal to
- D: Not equal to
View Answer
A
Q1802: Which relational operator is used to check if two variables are not equal in C++?
- A: =
- B: ==
- C: !=
- D: <=
View Answer
C
Q1803: In C++, what will if(a<=c) do if a and c are equal?
- A: It will print "a is greater"
- B: It will print "a is smaller"
- C: It will print "a is less than/equal to c"
- D: It will not print anything
View Answer
C
Q1804: Fill in the blank: The relational operator > checks if one value is _______ than another.
- A: Less
- B: Equal
- C: Greater
- D: Not equal
View Answer
C
Q1805: What will be the output of the following code snippet if a=10 and b=20?
- A: a is smaller, a is greater
- B: a is greater, a is smaller
- C: a is smaller, a is less than/equal to c
- D: a is smaller, a is greater than/equal to c
View Answer
C
Q1806: What does the relational operator == do in C++?
- A: Checks if two values are not equal
- B: Checks if two values are equal
- C: Checks if one value is greater than the other
- D: Checks if one value is less than the other
View Answer
B
Q1807: Fill in the blank: The relational operator != checks if two values are _______ in C++.
- A: Equal
- B: Not equal
- C: Less than
- D: Greater than
View Answer
B
Q1808: In the provided code, what will if(num1!=num2) output if num1 = 30 and num2 = 40?
- A: num1 Is Not Equal To num2
- B: num2 Is Equal To num3
- C: num1 Is Equal To num2
- D: num2 Is Not Equal To num3
View Answer
A
Q1809: What is the result of if(num2==num3) when num2 = 40 and num3 = 40 in C++?
- A: The output will be "num2 Is Not Equal To num3"
- B: The output will be "num1 Is Equal To num2"
- C: The output will be "num2 Is Equal To num3"
- D: The output will be "num1 Is Not Equal To num2"
View Answer
C
Q1810: Fill in the blank: In C++, relational operators return _______ based on the comparison of values.
- A: 0 or 1
- B: True or False
- C: A string
- D: A character
View Answer
A