Ready to take the next step in your coding journey? After mastering the core fundamentals in Set 01, it’s time to sharpen your logic and deepen your understanding.
This second set of the Computer Programming Basics Quiz is designed to challenge your grasp of programming logic and foundational structures. Whether you are a student preparing for exams or a self-taught learner building a solid base, these questions will help you bridge the gap between “knowing” and “applying.”
Multiple-Choice Questions (MCQs) Quiz on Basic Programming
1. Which of the following is used to store multiple values in a single variable?
- Array
- Function
- Loop
- Condition
Show answer
✅ Answer: A) Array
2. What is the function of an if statement in programming?
- To loop through a block of code
- To define a variable
- To execute code based on a condition
- To display output on the screen
Show answer
✅ Answer: C) To execute code based on a condition
3. Which programming language is primarily used for mobile app development?
- Kotlin
- SQL
- C++
- HTML
Show answer
✅ Answer: A) Kotlin
4. What does the print() function do in Python?
- Prints a document
- Displays text or output to the console
- Creates a file
- Deletes a variable
Show answer
✅ Answer: B) Displays text or output to the console
5. Which of the following is NOT a type of loop in programming?
- While
- Do-While
- For
- Execute
Show answer
✅ Answer: D) Execute
6. In JavaScript, how do you declare a variable?
var x = 5;variable x = 5;let x = 5;- Both A and C
Show answer
✅ Answer: D) Both A and C
7. What does SQL stand for?
- Structured Query Language
- Software Query Logic
- System Query Locator
- Stored Quick Language
Show answer
✅ Answer: A) Structured Query Language
8. What is the output of 5 % 2 in programming?
- 2
- 2.5
- 1
- 0
Show answer
✅ Answer: C) 1
9. Which of the following is a version control system?
- Git
- Java
- Swift
- Apache
Show answer
✅ Answer: A) Git
10. What is the purpose of a function in programming?
- To store data
- To execute a block of code when called
- To define loops
- To print values
Show answer
✅ Answer: B) To execute a block of code when called
More Quizzes in the Fundamentals Series
- Fundamentals of Programming Quiz: Test Your Coding Basics – Set 01
- Fundamentals of Programming Quiz: Test Your Coding Basics – Set 02
- Fundamentals of Programming Quiz: Test Your Coding Basics – Set 03
- Fundamentals of Programming Quiz: Test Your Coding Basics – Set 04
- Fundamentals of Programming Quiz: Test Your Coding Basics – Set 05
- Fundamentals of Programming Quiz: Test Your Coding Basics – Mock Test (Coming soon)





