Browse all practice questions for the CodeHS AP Computer Science Principles (CSP) Practice Exam. Search by topic, open any question and review its full explanation, then test yourself in the practice quiz.

2026 AP Computer Science Principles Practice Exam – Complete Preparation course image
More practice questions

These questions are part of the practice quiz. Start practicing

  • Which numbering system is base 8 and uses digits 0 through 7?
  • What word describes the act of writing instructions for a computer?
  • Which term describes information about a file such as its size, color depth, and resolution?
  • Which encryption scheme uses two different keys for encryption and decryption?
  • What word completes the acronym ASCII: American Standard Code for Information Interchange?
  • Which term describes the initial set of data as collected, prior to any cleaning or processing steps?
  • Which base uses digits 0-7?
  • If a JavaScript function does not return a value, what is returned by default?
  • Which of the following is true about the end of an array when using common array methods?
  • Which pair of words best completes the sentence: Lower level protocols guarantee higher level protocols will function without stating specifically how this will be accomplished?
  • What is the primary difference between symmetric and asymmetric encryption?
  • What term refers to the gap between people with ready access to computers and the Internet and those without?
  • Which term describes extremely large datasets that traditional data processing methods can't handle?
  • Which protocol provides reliable, ordered and error checked delivery of a stream of packets?
  • Which statement about Moore's Law is accurate?
  • What term refers to the visual elements of a program through which a user interacts with the application?
  • What is a Unicode code point?
  • What is the hexadecimal digit that represents decimal 15?
  • Which compression discards information to reduce size and cannot recover the discarded data?
  • Which extension denotes a graphics format that supports lossless data compression and is commonly used on the web?
  • Which extension is a lossless image format widely used on the web?
  • Which encryption method uses a fixed substitution of letters with no repeating patterns, producing ciphertext?
  • Which document typically accompanies a dataset to provide context, purpose, and provenance?
  • What term refers to the endings of file names that indicate the format for how the underlying bits are organized?
  • Which concept is defined as simplifying problems by focusing on general features and ignoring details?
  • Which HTTP method is typically used when the request should be idempotent and have no side effects on the server?
  • Which is a counting-based loop that increments a variable each iteration?
  • Which statement about a library in programming is true?
  • Which binary value represents decimal 14?
  • What is the fundamental unit of a digital image, typically a tiny square or dot that contains a single point of color?
  • Which control structure implements conditional statements in many programming languages?
  • What is the address used to call a web page?
  • What term refers to a type of data used for graphics or pictures?
  • Which encryption method uses different keys for encryption and decryption?
  • Why do network protocols use layering?
  • Which statement best differentiates data privacy from data security?
  • Why is random sampling important in data analysis?
  • When would you choose a while loop over a for loop?
  • Complete the term: domain name ________.
  • Which of the following is an example of a high-level programming language mentioned?
  • A Kilobyte is equal to how many Bytes?
  • UI is an acronym for what concept in software development?
  • Which extension denotes a bitmap image format?
  • What does an IPv4 private address such as 192.168.0.1 signify in a local network?
  • A single value of either TRUE or FALSE is called a
  • What operation is used to join text strings together, such as "Hello, " + name?
  • Which protocol is commonly used to deliver Hypertext documents on the web?
  • Which license enables free distribution of a work and permits sharing, use, and adaptation?
  • Name two common network topologies and one advantage for each.
  • Which term refers to creating simple representations of complex phenomena to help learn and communicate?
  • Which extension is used for a graphics format that supports lossless compression and is widely used for web graphics?
  • What general distinction exists between HTTP GET and POST requests?
  • What is scope in programming?
  • Which statement comparing ASCII and Unicode is correct?
  • Which option describes the secure transport protocol used for web traffic?
  • What happens if you access an array index equal to the array length in languages like JavaScript?
  • What concept dictates what portions of code can access a variable, depending on where created?
  • What term refers to repeating a process, often with each repetition moving toward an end point?
  • If a loop processes n items with constant work per item, and you double n, what happens to the total work?
  • Which term describes the practice of creating concise representations to help understanding of complex phenomena?
  • Which term describes a number system that uses 16 symbols, including A through F?
  • What information does a histogram convey about a data set?
  • Which practice involves finding and fixing problems in your algorithm or program?
  • One Megabyte is equal to how many Kilobytes?
  • Which tool or technique uses dynamic parameters to reduce a data set to viewing only similar items in a row or column?
  • What is the name of a cipher that encrypts text by applying a series of alphabetical shifts based on a keyword?
  • Which term describes joining text strings together (e.g., "Hello" + name)?
  • Which file extension is commonly used for a lossy image format designed for photographs?
  • Which of the following is a common aggregation operation that computes a single value from a set of values?
  • Which term describes a question with only two possible answers?
  • What is the generic term for a technique (or algorithm) that performs encryption?
  • If a loop processes n items with constant work per item, what is the overall time complexity?
  • Which topology is described as providing high redundancy and fault tolerance?
  • 1024 gigabytes is equal to which storage unit?
  • What term describes a number assigned to any device connected to the internet?
  • Which encryption technique maps each letter to a chosen other letter?
  • Which topology is typically easy to manage due to a central hub but can be a single point of failure?
  • Which term describes the process of repeating steps toward a final result?
  • What is the single unit of information in a computer?
  • What is the difference between ASCII and Unicode, and why is Unicode necessary?
  • In programming, a value that can be TRUE or FALSE is called a
  • What is the purpose of a checksum in data transmission?
  • What is the purpose of a base case in a recursive function?
  • What is the effect of a clear, descriptive function name on debugging?
  • Which option correctly expands the acronym ASCII?
  • What term describes an incremental or small improvement to an item?
  • Which of the following describes a primary benefit of using APIs?
  • Which concept describes the comparison of the popularity of topical queries in an online search engine over time?
  • How many bits are needed to uniquely represent 1,024 distinct values, and why?
  • What hex value represents white in 32-bit hex color?
  • In ASCII, how many bits are used to represent a character, and how is that typically stored in modern systems?
  • What did Moore's Law claim about transistor counts on integrated circuits, and is it continuing at the same pace today?
  • Which of the following is an example of a lossless image compression format?
  • Which extension is commonly used for photographs and uses lossy compression?
  • In digital graphics, which term refers to the color model that combines red, green, and blue channels to produce colors?
  • What service translates URLs to IP addresses?
  • What is the time complexity of a linear search on an unsorted list of n elements?
  • Which characteristic describes a high-level programming language?
  • Which term best describes a preliminary sketch or model used before building the final product?
  • Which traversal visits a node's deepest descendants before its siblings?
  • Which protocol is used for transmitting web pages over the Internet?
  • In a function call, what term refers to the actual value supplied to the function?
  • What extension corresponds to the Waveform Audio File Format for storing uncompressed audio data?
  • Which term denotes a basic unit of data used to measure memory capacity?
  • What term describes the repetition of information to reduce errors in transmission?
  • Which term describes a novel or improved idea, device, or product?
  • What is the universally recognized raw text format that any computer can understand?
  • How do you access the third element of an array named arr in JavaScript?
  • Which numbering system uses digits 0-9?
  • Which unit equals 1024 megabytes?
  • What term describes a value's property that tells the computer how to interpret the value?
  • Complete the term: transmission ____________ protocol.
  • Which term describes the attempt to decode a secret message without knowing all the specifics of the cipher?
  • Which feature of high-level languages most contributes to portability across computer systems?
  • Which of the following illustrates an abstraction layer and its benefit?
  • Which cipher uses a keyword to determine shifts for each letter in the plaintext?
  • Which unit equals 1024 bytes?
  • Name a comparison-based sorting algorithm with average time complexity O(n log n).
  • What condition is required for efficient binary search?
  • What term refers to the original data as it was collected?
  • What term describes secure web messaging where the encryption key is public and the decryption key is private?
  • DNS stands for Domain Name System.
  • Which term describes a single data element that defines the color value in an image?
  • What is the purpose of a library in programming?
  • What is pseudonymization in data privacy?
  • Which encryption method involves substituting each letter with another letter according to a fixed mapping?
  • If you implement a function max3(a, b, c) using nested if statements, what should it return?
  • Why does using a longer symmetric key generally increase security?
  • In JavaScript, what is the difference between '==' and '==='?
  • What process reverses encryption to reveal the original plaintext?
  • Which file extension corresponds to a commonly used lossy audio format?
  • Which term best describes a technique that performs encryption?
  • One Kilobyte is equal to how many bytes?
  • Why is it important to create test cases that cover edge cases like empty inputs or very large inputs?
  • When would you choose a while loop over a for loop?
  • Which encryption technique shifts every letter by a fixed number of positions in the alphabet?
  • 1024 megabytes is equal to which unit?
  • Which term is a broad umbrella for methods that perform encryption?
  • Which pair of words best completes the sentence: Higher level protocols use lower levels without needing to understand precisely how they work?
  • Redundancy in data transmission is best described as the repetition of information to reduce errors.
  • One Gigabyte is equal to how many Megabytes?
  • Why is hashing a password preferable to storing it in plain text?
  • Which statement about binary code is true?
  • What is the generic term for a technique (or algorithm) that performs encryption?
  • What data describes other data, such as the size of an image, the number of colors, or the resolution?
  • Which statement best describes HTTP GET requests?
  • Which term refers to extremely large datasets that traditional data processing methods can't handle?
  • Which symbol represents the 'or' logical operator?
  • Complete the term: uniform resource ________.
  • What principle states that all Internet traffic should be treated equally by Internet Service Providers?
  • Which numbering system uses digits 0-9?
  • Which statement about histograms is true?
  • Which statement about hashing with salt is true?
  • Apply De Morgan's law to the expression ¬(A ∧ B).
  • Which protocol ensures reliable, ordered delivery of a data stream between hosts?
  • Which extension is a compressed archive format that can contain multiple files?
  • When would you prefer a recursive solution over an iterative one?
  • Which extension denotes a compressed archive format that may contain one or more files or directories?
  • Which hex code is used to represent the color white in 32-bit hex notation?
  • How do you add an element to the end of an array named arr in JavaScript?
  • Which operator is used to negate a boolean condition?
  • Which color model uses varying intensities of red, green, and blue light to reproduce colors?
  • Which symbol represents the logical NOT operator?
  • Which hexadecimal digit represents decimal 15?
  • What happens if a recursive function never reaches the base case?
  • Which type of statements run only under certain conditions?
  • What is the generic term for a technique (or algorithm) that performs encryption?
  • What mathematical operation returns the remainder after division?
  • Which document provides background information about a dataset?
  • Which term refers to describing a system by focusing on essential aspects and ignoring details?
  • What best describes an API in software development?
  • Which number system uses 16 distinct symbols: 0-9 and A-F?
  • Which extension denotes a lossless image format widely used for web graphics with transparency support?
  • Which statement best describes the difference between latency and bandwidth in network performance?
  • Which statement describes the benefit of meaningful function names?
  • Which graph traversal algorithm visits as far as possible along a branch before backtracking?
  • In programming, what best distinguishes a parameter from an argument?
  • What is the representation of processor instructions using binary digits 0 and 1 called?
  • Which statement correctly describes the prerequisite and time complexity of a binary search?
  • What term describes a preliminary sketch or model for something new?
  • Why include an edge-case test with empty input?
  • Which statement best describes a key property of lossless compression, and give examples?
  • What does RFC stand for in networking standards?
  • Which operator would you use to perform logical OR?
  • What is the term for the number of bits that are conveyed or processed per unit of time?
  • With 8 bits, what is the maximum number of distinct values that can be represented?
  • What is the role of the Domain Name System (DNS) on the Internet?
  • What term describes an action that causes something to happen in a program?
  • Which compression preserves all original data?
  • Which term describes images, diagrams, or tables created from data to highlight a data story?
  • What does scalability mean in a computing system?
  • What is a placeholder for information that can change during a program's execution?
  • Which operator would you use to test if at least one of two conditions is true?
  • What is the term for a value passed to a function to customize it?
  • Why is breaking data into packets useful in network communication?
  • What term describes the ability to route around broken servers on the Internet?
  • The number of bits conveyed per unit of time is called the bit rate.
  • Which operator is used to compare two values and returns a Boolean result, distinct from the assignment operator?
  • Which extension is a graphics format with lossless compression and supports transparency?
  • Which category of programming language provides little or no abstraction from hardware and maps closely to processor instructions?
  • What is the 8-bit data unit called?
  • What is printed by the following code when x equals 12: if (x > 10) { print('big'); } else { print('small'); }
  • What term describes a problem-solving approach to find a satisfactory solution when an optimal solution is impractical or impossible?
  • Which statement about DNS is true?
  • HTTP stands for...
  • Why is adding a salt to a password before hashing important?
  • Which practice improves modularity in software design?
  • Which statement about global scope is true?
  • Why is it beneficial to design a function with a single responsibility and descriptive name?
  • What is the time complexity of nested loops where the inner loop runs n times for each of n iterations?
  • When you transform numerical data into charts or images to tell a story, this is called what?
  • What describes a set of rules governing the exchange or transmission of data between devices?
  • What is the precise sequence of instructions for processes that can be executed by a computer?
  • Which of the following is a valid way to access the property named 'name' on an object 'person' using dot notation?
  • What hex value represents black in 32-bit hex color?
  • If the data set is [2, 5, 5, 7, 9], what is the median?
  • What do you call a block of code that you can call repeatedly and that returns a value?
  • Which option lists the symbols used in binary code?
  • What is the generic term for a programming statement that uses a Boolean condition to determine whether to run a certain block of statements?
  • Which symbol represents the 'and' logical operator?
  • What term describes the act of repeating a process?
  • What term describes a computation that groups rows from a dataset to produce a single, meaningful value such as average or sum?
  • Which extension denotes an uncompressed audio file format?
  • What is the main difference between HTTP and HTTPS?
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy