Introduction to Computing MCQs with Answers
Practice important Introduction to Computing MCQs with answers and explanations.
Multiple Choice Questions
Q1811: What is the output of the following code if a=10, b=20, and c=10?
- A: a is smaller, a is less than/equal to c, a is greater than/equal to c
- B: a is greater, a is less than/equal to c, a is smaller
- C: a is greater, a is smaller, a is less than/equal to c
- D: a is less than/equal to c, a is smaller, a is greater
View Answer
A
Q1812: What is the output of the if(a>=c) statement when a is equal to c?
- A: a is greater than/equal to c
- B: a is less than/equal to c
- C: a is smaller
- D: No output
View Answer
A
Q1813: What does the AND operator require for the output to be 1?
- A: Both conditions are False
- B: At least one condition is True
- C: Both conditions are True
- D: At least one condition is False
View Answer
C
Q1814: Which logical operator in C++ inverts the output?
- A: AND
- B: OR
- C: NOT
- D: BOTH
View Answer
C
Q1815: In the given C++ code, what is the output of the statement `if(num1>=40 || num2>=40)` when `num1=30` and `num2=40`?
- A: OR If Block Gets Executed
- B: AND If Block Gets Executed
- C: NOT If Block Gets Executed
- D: No Output
View Answer
A
Q1816: In the provided code, what is the condition that causes the NOT operator block to execute?
- A: `num1>=40`
- B: `num1<40`
- C: `num2>=40`
- D: `num2<40`
View Answer
B
Q1817: What will be the output of the statement `if(num1>=20 && num2>=20)` if `num1=30` and `num2=40`?
- A: OR If Block Gets Executed
- B: AND If Block Gets Executed
- C: NOT If Block Gets Executed
- D: No Output
View Answer
B
Q1818: How many logical operators are used in the given C++ code?
- A: One
- B: Two
- C: Three
- D: Four
View Answer
C
Q1819: What will the `cout` statement print if the condition `!(num1>=40)` is satisfied with `num1=30`?
- A: OR If Block Gets Executed
- B: AND If Block Gets Executed
- C: NOT If Block Gets Executed
- D: No Output
View Answer
C
Q1820: What is a major challenge in software engineering compared to traditional engineering disciplines?
- A: Using off-the-shelf components
- B: Quantifying software properties
- C: Designing new components
- D: Managing project resources
View Answer
B