Back to library

Preview

Basics of Programming

Check your programming basics.

Computer ยท Programming25 questions25 min
Sign in to take this test
  1. 1

    What is a variable in programming?

    • A named storage location
    • A type of computer
    • A network cable
    • A compiler
  2. 2

    Which data type commonly represents true or false?

    • Integer
    • String
    • Boolean
    • Float
  3. 3

    What does a loop do?

    • Repeats instructions
    • Deletes a program
    • Changes hardware
    • Creates electricity
  4. 4

    Which loop is commonly used when the number of iterations is known?

    • for loop
    • if statement
    • class
    • import
  5. 5

    What is a function?

    • A reusable block of code
    • A hardware component
    • A file system
    • A variable type
  6. 6

    What does an if statement provide?

    • Conditional execution
    • Automatic compilation
    • Data storage
    • Network access
  7. 7

    What is an array?

    • A collection of elements
    • A compiler error
    • A single character only
    • A database server
  8. 8

    What is an index commonly used for?

    • Accessing an element in a collection
    • Compiling code
    • Creating hardware
    • Encrypting networks
  9. 9

    What is a string?

    • A sequence of characters
    • A decimal number
    • A Boolean only
    • A processor
  10. 10

    What is an integer?

    • A whole number
    • A sequence of characters
    • A true/false value
    • A function
  11. 11

    What is a float commonly used to represent?

    • Numbers with fractional parts
    • Only text
    • Only Boolean values
    • Functions
  12. 12

    What is an algorithm?

    • A step-by-step procedure for solving a problem
    • A programming language
    • A computer monitor
    • A database table
  13. 13

    What is debugging?

    • Finding and fixing program errors
    • Writing hardware
    • Compressing images
    • Installing an operating system
  14. 14

    What is syntax?

    • Rules governing valid program structure
    • Program speed
    • Computer memory
    • Internet bandwidth
  15. 15

    What is a compiler?

    • A program that translates source code
    • An input device
    • A database
    • A web browser
  16. 16

    What is an interpreter?

    • A program that executes or translates code at runtime
    • A keyboard
    • A storage drive
    • A programming variable
  17. 17

    What does recursion mean?

    • A function calling itself
    • A program stopping permanently
    • A variable changing type
    • A compiler failing
  18. 18

    What is object-oriented programming based around?

    • Objects and their data/behavior
    • Only mathematical equations
    • Only hardware
    • Only HTML
  19. 19

    What is inheritance in OOP?

    • A mechanism for deriving classes from other classes
    • Copying files
    • Deleting objects
    • Encrypting data
  20. 20

    What is encapsulation?

    • Bundling data and methods while controlling access
    • Repeating code
    • Deleting variables
    • Increasing CPU voltage
  21. 21

    What is a runtime error?

    • An error occurring during program execution
    • A spelling convention
    • A hardware upgrade
    • A database schema
  22. 22

    What does API stand for?

    • Application Programming Interface
    • Advanced Program Internet
    • Application Process Input
    • Automated Programming Instruction
  23. 23

    What is version control used for?

    • Tracking changes to code
    • Increasing screen brightness
    • Running electricity
    • Creating physical hardware
  24. 24

    What is Git?

    • A version-control system
    • A programming language
    • A database engine
    • A web browser
  25. 25

    What does Big-O notation describe?

    • Algorithmic growth in resource usage
    • Programming syntax
    • Screen resolution
    • Database passwords