12th class (Fsc) computer unit 11 MCQs
chapter 11 MCQs 12th Class computer
Decision Constructs:
1. Which programming structure executes program statements in order?
a. Sequence
b. Relation
c. Repetition
d. Decision
2. Which programming structure makes a comparison?
a. Sequence
b. Relation
c. Repetition
d. Decision
3. Another term for a computer making a decision is:
a. Repetition
b. Sequential
c. Iteration
d. Selection
4. This is a control structure that causes a statement or group of statements to repeat:
a. Loop
b. Decision statement
c. Logical
d. Sequential
5. The three programming structure are:
a. Sequence, definition and process
b. Sequence, decision and repetition
c. Relation, comparison and process
d. Process, decision and alternation
6. ……… refers to group of statements enclosed in opening and closing braces.
a. Sequence structure
b. Control structure
c. Instruction
d. Compound statement
7. In if statement, true is represented by:
a. 2
b. 0
c. 3
d. 1
8. What is the simplest selection structure?
a. If – else
b. If
c. Nested – if
d. Switch
9. In if statement, false is represented by:
a. 2
b. 0
c. 3
d. 1
10. Which of the given is used for making two way decisions?
a. Nested if
b. If
c. Switch
d. If – else
11. An if statement inside another if statement is called:
a. nested if statement
b. if statement
c. switch statement
d. if-else statement
12. The operators to compare operands and decide if the relation is true or false are:
a. Syntax operators
b. Arithmetic operators
c. Relational operators
d. Logical operators
13. When a relational expression is false, it has it value ………
a. Less than
b. Zero
c. One
d. None
14. Which of the following statement is the simplest form of a decision structure?
a. Try Catch Finally
b. Select Case
c. Nested if
d. If statement
15. ……….is used to specify two different choices with “if” statement.
a. If statement
b. Switch statement
c. If else
d. Else statement
16. Which of the following is not part of an if statement?
a. A true block
b. A condition that evaluates as a Boolean
c. All of are part of an IF statement
d. A condition that evaluates as true or false
17. An if statement inside the true block of another if statement is called:
a. A conditional operator
b. A nested if statement
c. A relational operator
d. A branched if statement
18. If x=10 and y=5, what will the output of the following expression?
a. 15
b. 5
c. 50
d. 10
19. Which keyword is not used in switch statement?
a. Case
b. Default
c. Switch
d. If
20. Switch statement is an alternative of:
a. Nested – if
b. If
c. Nested – if – else
d. If – else
21. The last statement of each case block in switch () structure must be:
a. Break
b. Default
c. Else
d. If – else
22. The case block in switch () structure ends with:
a. End case
b. End select
c. Case else
d. Break
23. Which of the following is called counter loop?
a. for loop
b. nested if-else
c. while loop
d. if-else
24. Which of the following is valid case statement in a switch statement:
a. Case x > 1
b. Case 1
c. Case 1.5
d. Case x < 1
25. Which is an example of multiple branches from single expression?
a. While loop
b. If statement
c. Switch statement
d. All
26. Which of the following are valid case statements in a switch?
a. Case ‘ab’
b. Case 1
c. Case1.5
d. Case x<4
27. A case can be defined as:
a. A statement that includes an IF statement
b. An individual condition to test
c. A block of selection code
d. A set of condition to test
28. The Case block ends with:
a. Break
b. End Select
c. Case Else
d. End Case
29. The conditional operator is used as alternative to:
a. If – else if – else
b. If
c. Switch
d. If – else
30. Term for conditional operator is:
a. Byte
b. Ternary
c. Iteration
d. Binary
31. Conditional operator takes:
a. Three operators
b. One operand
c. Four operands
d. Two operands
32. Which operator is called a ternary operator?
a. ?
b. If
c. ()
d. ++
33. Which of the following is equivalent to (p>=q)?
a. P>q
b. p>q
c. !p<
d. (p<q)
Click here to go directly on chapter no.12