How to program a computer
  • 1. What is the core function of a compiler?
A) Debugs code errors
B) Manages system resources
C) Executes code directly
D) Translates source code to machine code
  • 2. Which of the following is NOT a common programming paradigm?
A) Descriptive Programming
B) Object-Oriented Programming
C) Functional Programming
D) Procedural Programming
  • 3. What does the acronym IDE stand for?
A) Independent Data Entity
B) Interactive Design Element
C) Iterative Debugging Engine
D) Integrated Development Environment
  • 4. What is a variable?
A) A compilation error
B) A named storage location for data
C) A programming language
D) A type of loop
  • 5. Which data type typically represents true/false values?
A) String
B) Integer
C) Boolean
D) Float
  • 6. What is a function?
A) A reusable block of code
B) An operating system command
C) A data structure
D) A comment in the code
  • 7. What does 'DRY' stand for in programming?
A) Do Repeat Yourself
B) Data Repository Yearly
C) Debug and Release Yearly
D) Don't Repeat Yourself
  • 8. What is a loop used for?
A) Declaring a function
B) Repeating a block of code
C) Handling errors
D) Defining a variable
  • 9. What is debugging?
A) Writing documentation
B) Compiling code
C) Finding and fixing errors in code
D) Executing a program
  • 10. What is an algorithm?
A) A type of computer hardware
B) A software license
C) A programming language
D) A step-by-step procedure for solving a problem
  • 11. What is version control used for?
A) Running a program
B) Tracking changes to code
C) Compiling code faster
D) Designing user interfaces
  • 12. Which of these is a common control flow statement?
A) String
B) Variable
C) Integer
D) If-else
  • 13. What is a data structure?
A) A programming language syntax rule
B) A debugging tool
C) A type of computer hardware
D) A way to organize and store data
  • 14. What is a string?
A) A function definition
B) A numerical value
C) A sequence of characters
D) A true/false value
  • 15. What is an array?
A) A single variable
B) A collection of elements of the same data type
C) A conditional statement
D) A function definition
  • 16. What does API stand for?
A) Automated Protocol Integration
B) Advanced Program Installation
C) Application Programming Interface
D) Application Protocol Implementation
  • 17. What is the purpose of comments in code?
A) To explain the code's functionality
B) To slow down the program
C) To execute the code
D) To hide the code from others
  • 18. What is recursion?
A) A variable that never changes
B) A program with no errors
C) A loop that never ends
D) A function calling itself
  • 19. What is object-oriented programming?
A) Programming without functions
B) Programming without loops
C) Programming using only numbers
D) Programming using objects and classes
  • 20. What is a class in OOP?
A) A type of loop
B) A blueprint for creating objects
C) A single variable
D) A comment in the code
  • 21. What is an object in OOP?
A) A programming language
B) A type of error
C) An instance of a class
D) The class definition itself
  • 22. What is inheritance in OOP?
A) Importing a library
B) A class inheriting properties from another class
C) Deleting an object
D) Creating a new variable
  • 23. What is polymorphism in OOP?
A) Hiding data within a class
B) Deleting a class
C) Creating multiple classes
D) The ability of an object to take on many forms
  • 24. What is encapsulation in OOP?
A) Defining a function
B) Bundling data and methods within a class
C) Inheriting properties from another class
D) Creating multiple objects
  • 25. What is a framework?
A) A collection of pre-written code and tools
B) A type of computer hardware
C) A single programming language
D) A type of debugging tool
  • 26. What is a library?
A) A programming language syntax
B) A collection of reusable functions and classes
C) A type of error message
D) A complete application
  • 27. What is the purpose of testing?
A) To make the code run faster
B) To compile the code
C) To ensure the code works correctly
D) To write documentation
  • 28. What is unit testing?
A) Testing the database
B) Testing the entire program
C) Testing individual components of a program
D) Testing the user interface
  • 29. What is integration testing?
A) Testing individual functions
B) Testing the security of the program
C) Testing how different components work together
D) Testing the performance of the program
  • 30. What is refactoring?
A) Deleting unused code
B) Finding and fixing bugs
C) Adding new features to the code
D) Improving code without changing its functionality
Created with That Quiz — where test making and test taking are made easy for math and other subject areas.