Q#1: What is the main focus of the paragraph?
(A) Writing a program to display the digits of a number
(B) Writing a program to calculate the diameter, circumference, and area of a circle
(C) Analyzing problems and finding ways to program them
(D) Discussing the importance of decision-making in programming
Answer: (C) Analyzing problems and finding ways to program them
Q#2: How do you get the first digit of a number in the discussed program?
(A) Using the addition operator
(B) Using the multiplication operator
(C) Using the modulus operator
(D) Using the division operator
Answer: (C) Using the modulus operator
Q#3: What is the purpose of the integer division in the program?
(A) To round off the decimal part
(B) To obtain only the decimal part
(C) To truncate the decimal part and get the whole number
(D) To perform mathematical operations with decimals
Answer: (C) To truncate the decimal part and get the whole number
Q#4: How is the value of the variable ‘number’ updated to get the next digit in the program?
(A) number = number * 10
(B) number = number / 10
(C) number = number + 10
(D) number = number – 10
Answer: (B) number = number / 10
Q#5: In the given C program, what data type is used for variables storing the digits of the number?
(A) char
(B) float
(C) int
(D) double
Answer: (C) int
Q#6: What is the output of the sample program for the input 7531?
(A) 7, 5, 3, 1
(B) 1, 3, 5, 7
(C) 7, 7, 7, 7
(D) 1, 1, 1, 1
Answer: (B) 1, 3, 5, 7
Q#7: What is the main objective of the second program discussed in the paragraph?
(A) Sorting numbers
(B) Finding the square root of a number
(C) Calculating properties of a circle based on its radius
(D) Analyzing the problem and finding ways to program it
Answer: (C) Calculating properties of a circle based on its radius
Q#8: In the second program, why are the variables declared as float instead of int?
(A) To save memory
(B) To store whole numbers only
(C) To handle decimal values in calculations
(D) To perform logical operations
Answer: (C) To handle decimal values in calculations
Q#9: What formula is used to calculate the circumference of the circle in the second program?
(A) circumference = 2 * radius
(B) circumference = 3.14 * radius
(C) circumference = 2 * 3.14 * radius
(D) circumference = 3.14 * radius * radius
Answer: (C) circumference = 2 * 3.14 * radius
Q#10: What value is assigned to Pi in the second program?
(A) 3
(B) 3.1416
(C) 2.718
(D) 3.14
Answer: (D) 3.14
Q#11: What is the significance of using descriptive names for variables?
(A) It improves the program’s execution speed
(B) It makes the program more readable and understandable
(C) It reduces the memory usage
(D) It has no impact on the program
Answer: (B) It makes the program more readable and understandable
Q#12: How does the paragraph suggest handling the division by zero in programming?
(A) Use the modulus operator
(B) Use try-catch blocks
(C) Analyze the problem properly before coding
(D) Avoid using division operations
Answer: (C) Analyze the problem properly before coding
Q#13: Why is it recommended to reuse variables for better usage of memory?
(A) To save memory
(B) To increase the program’s speed
(C) To improve code readability
(D) To simplify the coding process
Answer: (A) To save memory
Q#14: What type of statements are discussed under the summary section?
(A) Conditional statements
(B) Iterative statements
(C) Declaration statements
(D) Assignment statements
Answer: (D) Assignment statements
Q#15: What is the main focus of the summary section?
(A) Describing the types of statements in C++
(B) Discussing flowcharting techniques
(C) Providing a summary of conditional statements
(D) Presenting sample programs for decision-making
Answer: (A) Describing the types of statements in C++
Q#16: In the decision-making structure in C, what follows the ‘if’ keyword?
(A) Condition
(B) Statement
(C) Variable
(D) Loop
Answer: (A) Condition
Q#17: What example is used to illustrate decision-making in everyday life?
(A) Sorting numbers
(B) Bringing milk if the shop is open
(C) Calculating circle properties
(D) Using logical operators
Answer: (B) Bringing milk if the shop is open
Q#18: What is the role of the ‘else’ keyword in the ‘if/else’ structure?
(A) It defines a loop
(B) It specifies logical operators
(C) It provides an alternative statement if the condition is false
(D) It has no significance in decision-making
Answer: (C) It provides an alternative statement if the condition is false
Q#19: What is emphasized regarding decision-making in programming?
(A) Making decisions based on random conditions
(B) Introducing decision-making power in programs
(C) Avoiding decision-making in programs
(D) Using decision-making only for complex problems
Answer: (B) Introducing decision-making power in programs
Q#20: According to the paragraph, what is the significance of using indentation in code?
(A) It improves program execution speed
(B) It is a requirement of the programming language
(C) It has no impact on the program
(D) It enhances code readability and understanding
Answer: (D) It enhances code readability and understanding