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