Introduction to Programming MCQs January 8, 2026July 11, 2024 by u930973931_answers 50 min Score: 0 Attempted: 0/50 Subscribe 1. Which of the following is a high-level programming language? (A) Assembly language (B) C++ (C) Machine language (D) Binary code 2. The process of finding and correcting errors in a program is called: (A) Executing (B) Compiling (C) Debugging (D) Interpreting 3. Which of the following is NOT a programming language? (A) HTML (B) CSS (C) Java (D) JPEG 4. Which programming language is known as the “mother of all languages”? (A) COBOL (B) Fortran (C) Assembly language (D) C 5. The process of converting source code into machine code is called: (A) Debugging (B) Compiling (C) Interpreting (D) Executing 6. Which of the following is an example of a procedural programming language? (A) Python (B) Haskell (C) C++ (D) SQL 7. What is the primary purpose of comments in a program? (A) To make the program more readable for humans (B) To instruct the computer (C) To hide code from execution (D) To speed up execution 8. Which data type stores whole numbers in most languages? (A) int (B) double (C) float (D) char 9. Which symbol is used for single-line comments in many languages? (A) /* */ (B) // (C) # (D) ' 10. In object-oriented programming, what is an object? (A) A function (B) A variable (C) A conditional statement (D) An instance of a class 11. Which of the following is NOT a fundamental programming control structure? (A) Sequence (B) Function (C) Case (D) Iteration 12. Which operator is used for exponentiation in many languages? (A) ^ (B) % (C) ** (D) & 13. Which of the following is a compiled programming language? (A) C# (B) JavaScript (C) Python (D) PHP 14. Which error causes a program to terminate abnormally? (A) Runtime error (B) Syntax error (C) Logic error (D) Compilation error 15. Which of the following is NOT a valid variable name? (A) 123variable (B) my_variable (C) _variable (D) variable123 16. What is a predefined action that performs a specific task called? (A) Algorithm (B) Variable (C) Function (D) Statement 17. Which paradigm emphasizes breaking problems into procedures? (A) Object-oriented programming (B) Procedural programming (C) Functional programming (D) Logical programming 18. What does IDE stand for? (A) Integrated Design Environment (B) Intelligent Development Environment (C) Integrated Debugging Environment (D) Integrated Development Environment 19. Which is a statically typed programming language? (A) Java (B) JavaScript (C) Python (D) Ruby 20. Which is NOT a primitive data type? (A) Boolean (B) Integer (C) String (D) Float 21. What is the purpose of conditional statements? (A) Repeat code (B) Define a function (C) Execute code based on condition (D) Define a variable 22. Which is a logical operator? (A) && (B) + (C) = (D) ; 23. A named storage location that holds a value is called: (A) Function (B) Variable (C) Object (D) Array 24. Which data type represents a single character? (A) string (B) txt (C) character (D) char 25. What is the purpose of loops? (A) Check errors (B) Execute code repeatedly (C) Display output (D) Stop execution 26. Which is a relational operator? 27. What does DRY stand for? (A) Duplicate Reuse Yield (B) Do Repeat Yourself (C) Don’t Repeat Yourself (D) Define Replace Yield 28. Which is an object-oriented programming language? (A) Python (B) C (C) Perl (D) Assembly language 29. What is the purpose of arrays? (A) Store multiple values of same type (B) Perform calculations (C) Define functions (D) Control execution 30. Which symbol is used for assignment? (A) > (B) == (C) = (D) = 31. In OOP, what is inheritance? (A) Creating objects (B) Reusing existing classes (C) Defining classes (D) Compiling code 32. Which is NOT a valid variable declaration? (A) x = int; (B) int x; (C) x = 5; (D) var x; 33. What is the purpose of encapsulation? (A) Hide implementation details (B) Create objects (C) Define functions (D) Perform calculations 34. Which is a functional programming language? (A) Python (B) C++ (C) Haskell (D) Ruby 35. Which operator combines conditions? (A) || (B) & (C) ! (D) 36. A named section performing a task is called: (A) Algorithm (B) Statement (C) Variable (D) Function 37. Which language uses dynamic typing? (A) Java (B) Python (C) C# (D) C++ 38. What does an if–else statement do? (A) Repeat code (B) Define function (C) Execute based on condition (D) Define variable 39. Which is a bitwise operator? (A) & (B) || (C) && (D) ! 40. A predefined task-performing unit is called: (A) Algorithm (B) Function (C) Variable (D) Statement 41. Which is NOT a valid programming language? (A) Python (B) Java (C) HTML (D) PHP 42. Which operator is used for exponentiation? (A) ^ (B) % (C) ** (D) & 43. Which error occurs during program execution? (A) Syntax error (B) Logic error (C) Runtime error (D) Compilation error 44. Which is NOT a valid variable name? (A) my_variable (B) _variable (C) 123variable (D) variable123 45. A predefined task is called: (A) Algorithm (B) Statement (C) Variable (D) Function 46. Which is a procedural programming language? (A) Python (B) Haskell (C) C++ (D) SQL 47. Which is NOT a control structure? (A) Sequence (B) Iteration (C) Function (D) Case 48. Which is known as the “mother of all languages”? (A) Assembly language (B) COBOL (C) Fortran (D) C 49. Which is a high-level language? (A) Assembly language (B) Machine language (C) Binary code (D) C++ 50. Finding and fixing errors is called: (A) Compiling (B) Debugging (C) Executing (D) Interpreting