Fundamentals of Programming Quiz: Test Your Coding Basics – Set 03

Welcome to Set 03 of the Fundamentals of Programming Quiz! This quiz is designed to test and strengthen your grasp of core programming concepts, from coding basics to logical problem-solving. Building on the earlier sets, this installment challenges you with practical questions that sharpen your skills in syntax, algorithms, and debugging. Whether you’re preparing for interviews, brushing up on fundamentals, or simply exploring coding for fun, this quiz will help you measure your progress and boost your confidence

Multiple-Choice Questions (MCQs) Quiz on Basic Programming

1. Which programming language is known for its simplicity and readability?

  1. C++
  2. JavaScript
  3. Python
  4. Assembly
Show answer

✅ Answer: C) Python

2. What symbol is used to denote comments in Python?

  1. //
  2. #
  3. /* */
  4. --
Show answer

✅ Answer: B) #

3. What does the return statement do in a function?

  1. Stops the function execution
  2. Returns a value from the function
  3. Prints a message to the console
  4. Declares a new function
Show answer

✅ Answer: B) Returns a value from the function

4. Which of the following is NOT a valid data type in Python?

  1. String
  2. Integer
  3. Boolean
  4. Folder
Show answer

✅ Answer: D) Folder

5. What is the output of print(10 // 3) in Python?

  1. 3.33
  2. 3
  3. 3.0
  4. 10
Show answer

✅ Answer: B) 3

6. Which of the following is used to repeat a block of code a fixed number of times?

  1. if statement
  2. for loop
  3. function
  4. class
Show answer

✅ Answer: B) for loop

7. What does IDE stand for in programming?

  1. Integrated Development Environment
  2. Internet Data Explorer
  3. Interactive Debugging Engine
  4. Intelligent Data Extractor
Show answer

✅ Answer: A) Integrated Development Environment

8. Which of the following best describes an algorithm?

  1. A programming language
  2. A step-by-step process to solve a problem
  3. A storage device
  4. A web development framework
Show answer
  • ✅ Answer: B) A step-by-step process to solve a problem

9. In JavaScript, how do you write an array?

  1. {1, 2, 3}
  2. [1, 2, 3]
  3. (1, 2, 3)
  4. "1, 2, 3"
Show answer

✅ Answer: B) [1, 2, 3]

10. What is the correct way to declare a function in JavaScript?

  1. function myFunction() {}
  2. def myFunction()
  3. new function myFunction()
  4. func myFunction()
Show answer

✅ Answer: A) function myFunction() {}

More Quizzes in the Fundamentals Series

Scroll to Top