0% found this document useful (0 votes)
1 views

Computer Programming Exit Exam Questions (1)

Uploaded by

zebene
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Computer Programming Exit Exam Questions (1)

Uploaded by

zebene
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1. Which of the following best defines an algorithm?

Remember
a) A coding language
b) A set of instructions to solve a problem
c) A hardware component
d) A debugging tool
✅ Answer: b) A set of instructions to solve a problem

2. What is the main purpose of a flowchart in programming? Understand


a) To write executable code
b) To design the structure of a website
c) To visually represent the logic of an algorithm
d) To store program files
✅ Answer: c) To visually represent the logic of an algorithm

3. Which of the following is not a type of programming language? Remember


a) Python
b) Java
c) Flowchart
d) C++
✅ Answer: c) Flowchart
4. How do flowcharts help in developing a program? Understand
a) They execute the program line by line
b) They eliminate the need for testing
c) They help in understanding the sequence of operations
d) They create source code automatically
✅ Answer: c) They help in understanding the sequence of operations
5. What is the role of the logical AND (&&) operator in a conditional statement? Understand

a) It executes both conditions separately


b) It returns true only if both conditions are true
c) It returns true if at least one condition is true
d) It negates the condition
✅ Answer: b) It returns true only if both conditions are true

6. Which of the following control statements is used to terminate a loop immediately and transfer control to the s
loop? Understand

a) continue
b) switch
c) break
d) return
✅ Answer: c) break
7. Given the expression x = (a > b) ? a : b;, what kind of operation is being performed, and what
does it achieve? Analyze

a) It assigns a to x unconditionally
b) It compares a and b and assigns the smaller value to x
c) It compares a and b and assigns the greater value to x using a ternary operator
d) It swaps the values of a and b
✅ Answer: c) It compares a and b and assigns the greater value to x using a ternary operator

8. Why is logical thinking important in computer programming? Understand

a) To memorize all programming syntax


b) To speed up typing code
c) To structure and solve problems step by step
d) To design computer hardware
✅ Answer: c) To structure and solve problems step by step

9. You are asked to design a simple program that calculates the average of three numbers. Which
of the following steps shows correct logical thinking? Create

a) Just print the three numbers


b) Add the numbers and divide by 2
c) Take input, add the numbers, divide the sum by 3, and display the result
d) Skip taking inputs and guess the average
✅ Answer: c) Take input, add the numbers, divide the sum by 3, and display the result

You might also like