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