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