First 50 of 190 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Programming, object modelling and software development
In UML class diagrams, what does a solid line with a hollow (unfilled) triangular arrowhead typically represent?
- Inheritance (Vererbung) - a subclass extending a superclass Correct answer.
- A simple, unspecified association with no particular meaning
- A comment or annotation with no structural meaning
- A method's return type
Explanation
In UML class diagrams, a solid line with a hollow triangular arrowhead pointing to the superclass represents inheritance, indicating that a subclass extends and specializes the superclass.
Question 2Programming, object modelling and software development
Which best describes 'Vererbung' (inheritance) in object-oriented programming?
- A mechanism allowing a new class (subclass) to acquire the attributes and methods of an existing class (superclass), while potentially adding or overriding features Correct answer.
- A mechanism that forbids any class from ever sharing properties with another class
- A term describing only the deletion of a class from a program
- A synonym for encapsulation with no distinction
Explanation
Inheritance allows a subclass to acquire the attributes and methods of a superclass, supporting code reuse and hierarchical modeling, while the subclass can also add new features or override inherited ones.
Question 3Programming, object modelling and software development
Which best describes 'Kapselung' (encapsulation) in object-oriented programming?
- Bundling data and the methods that operate on it within a class, while restricting direct external access to internal implementation details Correct answer.
- A rule requiring all class attributes to be publicly accessible from anywhere in the program
- A synonym for inheritance with no distinction
- A technique used only for sorting arrays
Explanation
Encapsulation bundles data (attributes) and the methods that operate on them within a class, typically restricting direct external access (e.g., via private attributes) to protect internal implementation details and enforce controlled interaction.
Question 4Programming, object modelling and software development
Which best describes 'Polymorphie' (polymorphism) in object-oriented programming?
- The ability for objects of different classes to be treated through a common interface, with each responding to the same method call in its own specific way Correct answer.
- A rule forbidding any two classes from sharing a common method name
- A term describing only the physical size of a program's source code file
- A synonym for a variable's data type declaration
Explanation
Polymorphism allows objects of different classes to be treated through a shared interface (e.g., a common superclass or interface), with each object responding to the same method call according to its own specific implementation.
Question 5Programming, object modelling and software development
In UML class diagrams, how is a class's private attribute typically denoted?
- With a minus sign (−) before the attribute name Correct answer.
- With a plus sign (+) before the attribute name
- With no symbol of any kind, ever
- With a question mark (?) before the attribute name
Explanation
In standard UML notation, a minus sign (−) preceding an attribute or method name indicates private visibility, meaning it is accessible only within the defining class.
Question 6Programming, object modelling and software development
Which best describes a 'Konstruktor' (constructor) in object-oriented programming?
- A special method automatically called when an object is created, typically used to initialize the object's attributes Correct answer.
- A method that can only be called to delete an object
- A method identical in every respect to any regular class method with no special role
- A term describing only the physical construction of computer hardware
Explanation
A constructor is a special method automatically invoked when a new object is instantiated, typically used to initialize the object's attributes to appropriate starting values.
Question 7Programming, object modelling and software development
Which best describes the difference between a 'Klasse' (class) and an 'Objekt' (object) in object-oriented programming?
- A class is a blueprint/template defining attributes and methods, while an object is a specific instance created from that class Correct answer.
- A class and an object are exact synonyms with no distinction whatsoever
- An object always exists before any class is ever defined
- A class can only ever produce exactly one single object
Explanation
A class defines a blueprint or template specifying attributes and methods, while an object is a specific, concrete instance created from that class, with its own particular attribute values.
Question 8Programming, object modelling and software development
In UML, which relationship type is typically shown as a solid line with a filled diamond, representing a strong 'part-whole' relationship where the part cannot exist independently of the whole?
- Komposition (composition) Correct answer.
- Assoziation (a generic, weak relationship) with no diamond symbol
- Vererbung (inheritance)
- A method call with no structural relationship meaning
Explanation
Composition, shown with a solid filled diamond, represents a strong part-whole relationship where the part's lifecycle is tied to the whole (e.g., a house and its rooms), distinct from the weaker aggregation relationship (hollow diamond).
Question 9Programming, object modelling and software development
Which best describes 'Methodenüberschreibung' (method overriding) as it relates to inheritance and polymorphism?
- A subclass providing its own specific implementation of a method that is already defined in its superclass Correct answer.
- A rule forbidding any subclass from defining methods with the same name as the superclass
- A term describing the deletion of a method from a class entirely
- A concept unrelated to inheritance or polymorphism
Explanation
Method overriding occurs when a subclass provides its own specific implementation of a method already defined in its superclass, a key mechanism enabling polymorphic behavior.
Question 10Programming, object modelling and software development
Which best describes an 'abstrakte Klasse' (abstract class) in object-oriented programming?
- A class that cannot be directly instantiated and often serves as a base class defining a common interface for its subclasses Correct answer.
- A class that can only ever have exactly zero attributes or methods
- A synonym for a fully instantiated, concrete object
- A class that automatically deletes itself after one use
Explanation
An abstract class cannot be directly instantiated and typically serves as a base class defining a common interface or partial implementation that concrete subclasses must complete.
Question 11Programming, object modelling and software development
Which best describes 'Vererbungshierarchie' (inheritance hierarchy) as applied in a UML class diagram modeling animals (e.g., Animal, Dog, Cat)?
- A structured arrangement where more specific subclasses (Dog, Cat) inherit shared attributes and methods from a more general superclass (Animal) Correct answer.
- A rule requiring Dog and Cat to have absolutely no relationship to Animal whatsoever
- A term describing only the alphabetical ordering of class names
- A hierarchy that can only ever include exactly one single class
Explanation
An inheritance hierarchy structures classes from general to specific, with subclasses like Dog and Cat inheriting shared attributes and methods (e.g., name, eat()) from a general superclass like Animal, while adding their own specific features.
Question 12Programming, object modelling and software development
Which best describes a 'Schnittstelle' (interface) in object-oriented programming, distinct from a class?
- A contract specifying a set of methods that implementing classes must provide, without dictating how those methods are implemented Correct answer.
- A term identical in every respect to a concrete class with full method implementations
- A structure that can never be implemented by any class
- A concept unrelated to defining expected class behavior
Explanation
An interface defines a contract - a set of method signatures that implementing classes must provide - without specifying how those methods work internally, supporting flexible, decoupled design.
Question 13Programming, object modelling and software development
Which best describes an 'Assoziation' (association) in UML class diagrams, as the most general relationship type between two classes?
- A structural relationship indicating that objects of one class are connected to or interact with objects of another class Correct answer.
- A relationship type that can only ever exist between a class and itself
- A synonym for inheritance with no distinction
- A relationship that forbids any two classes from ever interacting
Explanation
An association is the most general UML relationship type, indicating that objects of one class are connected to or interact with objects of another class (e.g., a 'Student' is enrolled in a 'Course'), shown as a plain line.
Question 14Algorithms, recursion and complexity
In computer science, an 'algorithm' is best defined as:
- A precise, finite sequence of unambiguous steps that solves a specific problem or class of problems Correct answer.
- A random collection of instructions with no defined order
- A physical computer chip
- A programming language's official syntax rules only
Explanation
An algorithm is a precise, finite, unambiguous sequence of steps designed to solve a specific problem, a foundational concept underlying all of computer science.
Question 15Algorithms, recursion and complexity
Which sorting algorithm repeatedly steps through a list, compares adjacent elements, and swaps them if they are in the wrong order?
- Bubblesort Correct answer.
- Binary search
- Depth-first search
- Hashing
Explanation
Bubblesort repeatedly compares and swaps adjacent elements in a list, 'bubbling' larger (or smaller) elements toward one end with each pass, until the list is sorted.
Question 16Algorithms, recursion and complexity
What is the worst-case time complexity of Bubblesort for sorting n elements?
- O(n²) Correct answer.
- O(log n)
- O(1)
- O(n log n) always, with no exceptions
Explanation
Bubblesort's worst-case time complexity is O(n²), since in the worst case (e.g., a reverse-sorted list) it must perform nested comparisons across the entire list multiple times.
Question 17Algorithms, recursion and complexity
Binary search (binäre Suche) requires which precondition to work correctly?
- The list being searched must already be sorted Correct answer.
- The list must contain exactly one element
- The list must be unsorted for the algorithm to function
- No precondition is required whatsoever
Explanation
Binary search requires a sorted list, since it repeatedly halves the search interval by comparing the target value to the middle element, a strategy that only works correctly on ordered data.
Question 18Algorithms, recursion and complexity
What is the time complexity of binary search on a sorted list of n elements?
- O(log n) Correct answer.
- O(n²)
- O(n!)
- O(2^n)
Explanation
Binary search has O(log n) time complexity because each comparison eliminates half of the remaining search space, making it far more efficient than linear search for large sorted datasets.
Question 19Algorithms, recursion and complexity
Which data structure follows a strict 'Last In, First Out' (LIFO) principle?
- Stack (Stapel) Correct answer.
- Queue (Warteschlange)
- Binary tree
- Hash table
Explanation
A stack follows LIFO: the most recently added element ('last in') is the first one removed ('first out') - like a stack of plates where you can only add or remove from the top.
Question 20Algorithms, recursion and complexity
Which data structure follows a strict 'First In, First Out' (FIFO) principle?
- Queue (Warteschlange) Correct answer.
- Stack (Stapel)
- Set (Menge)
- None of these structures follow any defined ordering
Explanation
A queue follows FIFO: the first element added is the first one removed - like people waiting in a line, where whoever arrives first is served first.
Question 21Algorithms, recursion and complexity
In a binary search tree (binärer Suchbaum), what property must every node satisfy relative to its subtrees?
- All values in the left subtree must be smaller, and all values in the right subtree must be larger than the node's own value Correct answer.
- All values in the tree must be exactly identical
- The tree must have no more than one node total
- Every node must have exactly three children
Explanation
In a binary search tree, every node's value must be greater than all values in its left subtree and less than all values in its right subtree, enabling efficient search, insertion, and deletion.
Question 22Algorithms, recursion and complexity
Which best describes 'Rekursion' (recursion) as a programming technique?
- A technique in which a function calls itself, typically breaking a problem into smaller subproblems until reaching a base case Correct answer.
- A technique that forbids a function from ever calling itself
- A technique used only for sorting numbers, never for other tasks
- A synonym for iteration with absolutely no distinction
Explanation
Recursion is a technique where a function calls itself to solve smaller instances of the same problem, continuing until a base case is reached that can be solved directly without further recursive calls.
Question 23Algorithms, recursion and complexity
What happens if a recursive function has no correctly defined base case?
- The function will call itself indefinitely, typically leading to a stack overflow error Correct answer.
- The function will automatically terminate after exactly one call
- The function will always produce the correct result regardless
- The function becomes a non-recursive iterative loop automatically
Explanation
Without a correctly defined base case, a recursive function will keep calling itself indefinitely, eventually exhausting the call stack and causing a stack overflow error.
Question 24Algorithms, recursion and complexity
Which best describes 'Insertion Sort' (Einfügesort)?
- An algorithm that builds a sorted portion of the list one element at a time, inserting each new element into its correct position Correct answer.
- An algorithm that only works on already fully sorted lists
- An algorithm that randomly shuffles all elements repeatedly
- An algorithm identical in every respect to binary search
Explanation
Insertion Sort builds a sorted sublist incrementally, taking each subsequent element from the unsorted portion and inserting it into its correct position within the already-sorted part.
Question 25Algorithms, recursion and complexity
Which best describes 'Merge Sort' (Sortieren durch Mischen)?
- A divide-and-conquer algorithm that recursively splits a list into halves, sorts each half, and then merges the sorted halves back together Correct answer.
- An algorithm that never divides the input list at all
- An algorithm with the same O(n²) worst-case complexity as Bubblesort
- An algorithm used exclusively for searching, never for sorting
Explanation
Merge Sort uses a divide-and-conquer strategy: it recursively splits the list into halves, sorts each half, and then merges the sorted halves, achieving O(n log n) time complexity.
Question 26Algorithms, recursion and complexity
Which best describes a 'linked list' (verkettete Liste) as a data structure?
- A sequence of nodes where each node contains data and a reference (pointer) to the next node in the sequence Correct answer.
- A data structure that must always have a fixed, unchangeable size determined at creation
- A data structure identical in every way to an array
- A structure with no way to access any data whatsoever
Explanation
A linked list consists of nodes, each containing data and a reference to the next node, allowing dynamic size changes without requiring contiguous memory allocation like an array.
Question 27Algorithms, recursion and complexity
Which best describes 'Komplexitätsanalyse' (complexity analysis) in the context of algorithm evaluation?
- The study of how an algorithm's resource usage (time or memory) scales as the size of its input grows Correct answer.
- An analysis of how visually complex a program's user interface appears
- A method for determining a programmer's personal salary
- A concept unrelated to algorithm efficiency
Explanation
Complexity analysis studies how an algorithm's resource requirements (typically time or memory) scale as input size grows, commonly expressed using Big-O notation.
Question 28Algorithms, recursion and complexity
Which best describes a 'Queue' implemented specifically for breadth-first search (Breitensuche) traversal of a graph or tree?
- It stores discovered but not-yet-visited nodes, processing them in the order they were discovered (FIFO) Correct answer.
- It stores nodes in a strictly random, unordered fashion
- It processes the most recently discovered node first (LIFO)
- It has no application in graph or tree traversal algorithms
Explanation
Breadth-first search uses a queue (FIFO structure) to process discovered nodes in the order they were found, ensuring the traversal explores level by level, outward from the starting node.
Question 29Algorithms, recursion and complexity
Which best describes 'Depth-First Search' (Tiefensuche) as a graph/tree traversal strategy?
- It explores as far as possible along each branch before backtracking, typically implemented using a stack or recursion Correct answer.
- It always visits every node in a graph in exactly the same order regardless of structure
- It is used exclusively for sorting numerical arrays, never for graphs or trees
- It requires no data structure of any kind to implement
Explanation
Depth-first search explores as deeply as possible along each branch of a graph or tree before backtracking, typically implemented using a stack (explicitly or via recursive function calls).
Question 30Algorithms, recursion and complexity
Which best describes an 'array' (Feld/Array) as a basic data structure?
- A fixed-size collection of elements stored in contiguous memory, accessed via numeric indices Correct answer.
- A data structure whose size can never be determined at any point
- A structure that can only ever store a single element
- A concept unrelated to storing multiple data values
Explanation
An array is a fixed-size collection of elements stored in contiguous memory locations, allowing efficient access to any element via its numeric index.
Question 31Algorithms, recursion and complexity
Which best describes a 'hash table' (Hashtabelle) and its primary advantage?
- A data structure that maps keys to values using a hash function, typically enabling average-case O(1) lookup, insertion, and deletion Correct answer.
- A structure that always requires searching through every single element sequentially with no shortcuts
- A structure that can only store exactly one key-value pair total
- A structure unrelated to storing key-value pairs
Explanation
A hash table uses a hash function to map keys to specific storage locations, typically achieving average-case constant-time O(1) lookup, insertion, and deletion - much faster than sequential search for large datasets.
Question 32Algorithms, recursion and complexity
Which best describes a 'Hash-Kollision' (hash collision)?
- A situation in which two different keys are mapped by a hash function to the same storage location Correct answer.
- A situation in which two computers physically collide during transport
- A term describing a successful, error-free program execution
- A concept unrelated to hash tables
Explanation
A hash collision occurs when a hash function maps two distinct keys to the same storage location (bucket), requiring collision-resolution strategies like chaining or open addressing.
Question 33Algorithms, recursion and complexity
Which best describes the 'Divide and Conquer' (Teile und herrsche) algorithmic paradigm?
- Breaking a problem down into smaller, more manageable subproblems, solving each independently, and combining their solutions Correct answer.
- Solving an entire problem in exactly one indivisible step with no subdivision at all
- A paradigm used exclusively for user-interface design, never for algorithms
- A strategy that forbids any recursive function calls
Explanation
The Divide and Conquer paradigm breaks a problem into smaller subproblems, solves each independently (often recursively), and then combines their solutions to solve the original problem - exemplified by Merge Sort.
Question 34Algorithms, recursion and complexity
Which best describes 'Selection Sort' (Selectionsort/Auswahlsortieren)?
- An algorithm that repeatedly finds the minimum (or maximum) element from the unsorted portion and moves it to the sorted portion Correct answer.
- An algorithm that requires the input list to already be perfectly sorted before it can run
- An algorithm identical in every respect to binary search
- An algorithm that only works on lists containing exactly two elements
Explanation
Selection Sort repeatedly finds the minimum (or maximum) element from the remaining unsorted portion of the list and swaps it into its correct position, gradually building the sorted portion.
Question 35Algorithms, recursion and complexity
Which best describes the general concept of 'Pseudocode' as used in algorithm design and Informatik exams?
- An informal, high-level description of an algorithm's logic using structured but language-independent notation, without strict programming-language syntax Correct answer.
- A term describing only compiled machine code with no human-readable form
- A programming language that must be executed exactly as written by a computer
- A concept unrelated to describing algorithms
Explanation
Pseudocode is an informal, high-level, language-independent notation for describing an algorithm's logic clearly, without requiring strict adherence to any specific programming language's syntax - commonly used in exam answers and textbooks.
Question 36Algorithms, recursion and complexity
Which best describes a 'Schleife' (loop) as a fundamental programming control structure?
- A control structure that repeats a block of code multiple times, typically until a specified condition is met Correct answer.
- A control structure that executes code exactly once with no possibility of repetition
- A term describing only variable declarations with no repetition involved
- A structure unrelated to controlling program execution flow
Explanation
A loop is a fundamental control structure that repeats a block of code multiple times, typically continuing until a specified condition (e.g., a counter reaching a limit) is satisfied.
Question 37Algorithms, recursion and complexity
Which best describes a 'bedingte Anweisung' (conditional statement, e.g., if-else) as a control structure?
- A structure that executes different blocks of code depending on whether a specified condition evaluates to true or false Correct answer.
- A structure that always executes every possible code branch simultaneously with no selection
- A term describing only mathematical addition operations
- A structure unrelated to decision-making in a program
Explanation
A conditional statement (like if-else) executes different code blocks depending on whether a specified boolean condition evaluates to true or false, enabling decision-making within a program's logic.
Question 38Algorithms, recursion and complexity
Which best describes the general concept of a 'Variable' in programming?
- A named storage location in memory that holds a value, which can typically be changed during program execution Correct answer.
- A fixed value that can never be changed once the program starts running
- A term describing only the physical RAM chip inside a computer
- A concept unrelated to storing data in a program
Explanation
A variable is a named storage location in a program's memory that holds a value, and (unlike a constant) can typically be reassigned to a different value as the program executes.
Question 39Algorithms, recursion and complexity
Which best describes the difference between a 'Datentyp' (data type) like Integer and one like String?
- Integer represents whole numbers, while String represents sequences of characters (text) - different data types suited to different kinds of values Correct answer.
- Integer and String are exact synonyms with no distinction whatsoever
- Integer can only ever store text, never numbers
- String can only ever store numbers, never text
Explanation
Data types classify the kind of value a variable can hold and how it can be used: Integer represents whole numbers, while String represents sequences of characters (text) - each suited to different operations and use cases.
Question 40Algorithms, recursion and complexity
Which best describes a 'Boolean' data type?
- A data type that can hold only one of two values: true or false Correct answer.
- A data type used exclusively for storing large text documents
- A data type that can hold any decimal number with unlimited precision
- A data type unrelated to logical operations
Explanation
A Boolean data type can hold only one of two possible values - true or false - and is fundamental to conditional statements, logical operations, and control flow in programming.
Question 41Digital representation and data structures
How many bits are in one byte?
- 8 Correct answer.
- 4
- 16
- 1024
Explanation
By definition, one byte equals 8 bits. This is a foundational unit used in performing calculations with bits and bytes, a GACE Data objective.
Question 42Digital representation and data structures
An encoding scheme uses 8 bits to represent each character. How many distinct characters can it represent?
- 256 Correct answer.
- 8
- 128
- 16
Explanation
With n bits, you can represent 2 to the power n distinct values. For 8 bits, 2^8 = 256 distinct characters. Determining how many values a given number of bits can encode is a GACE Data objective.
Question 43Digital representation and data structures
Which statement correctly distinguishes lossy from lossless data compression?
- Lossless compression preserves all original data exactly, while lossy compression discards some data to achieve smaller file sizes Correct answer.
- Lossy compression always preserves every bit of the original data
- Lossless compression always produces smaller files than lossy compression
- There is no difference between lossy and lossless compression
Explanation
Lossless compression (for example, ZIP or PNG) lets the exact original data be reconstructed, while lossy compression (for example, JPEG or MP3) permanently discards some data to shrink files further. Describing lossy and lossless compression is a GACE Data objective.
Question 44Digital representation and data structures
A teacher explains the difference between encoding and encryption. Which statement is correct?
- Encoding transforms data into another format for usability and is easily reversible without a secret, while encryption secures data so it can be read only with a key Correct answer.
- Encoding and encryption are identical processes with the same purpose
- Encryption is used only to compress files, never to secure them
- Encoding requires a secret key to reverse, while encryption never does
Explanation
Encoding changes data into another format (such as ASCII or Base64) for storage or transmission and is reversible by anyone who knows the scheme, whereas encryption deliberately protects data so only a holder of the correct key can read it. Distinguishing encoding from encryption is a GACE Data objective.
Question 45Digital representation and data structures
Ordering common units of digital storage from smallest to largest, which sequence is correct?
- Kilobyte, megabyte, gigabyte, terabyte Correct answer.
- Gigabyte, megabyte, kilobyte, terabyte
- Terabyte, gigabyte, megabyte, kilobyte
- Megabyte, kilobyte, gigabyte, terabyte
Explanation
Each unit is roughly a thousand times larger than the previous: kilobyte, megabyte, gigabyte, then terabyte, from smallest to largest. Identifying measures of file size such as byte, kilo, mega, giga, tera, and peta is a GACE Data objective.
Question 46Digital representation and data structures
Approximately how many bytes are needed to store a plain-text document containing 2,000 characters, assuming one byte per character?
- About 2,000 bytes (roughly 2 kilobytes) Correct answer.
- About 16 bytes
- About 2 million bytes
- About 8 bytes
Explanation
If each character takes one byte, a 2,000-character document requires about 2,000 bytes, which is roughly 2 kilobytes. Determining the number of bits and bytes required to store a given amount of data is a GACE Data objective.
Question 47Digital representation and data structures
Why are binary numbers fundamental to the operation of computer systems?
- Digital hardware represents data using two-state electronic components, such as on/off or high/low voltage, which map naturally to the digits 0 and 1 Correct answer.
- Binary is the only number system that can represent fractions
- Binary uses ten digits, making it efficient for humans
- Binary cannot be converted to any other number base
Explanation
Computers are built from electronic components that have two stable states, commonly represented as 0 and 1, so binary is the natural language of digital hardware. Explaining why binary numbers are fundamental to computer systems is a GACE Data objective.
Question 48Digital representation and data structures
A run-length encoding scheme compresses the string AAAAA by storing it as 5A. This is an example of which kind of compression?
- Lossless compression, because the original string can be fully reconstructed Correct answer.
- Lossy compression, because data is permanently discarded
- Encryption, because the data is now secret
- Encoding into hexadecimal
Explanation
Run-length encoding records a count and the repeated symbol (5A for AAAAA) and allows the exact original string to be rebuilt, so it is lossless compression. Describing lossy and lossless compression is a GACE Data objective.
Question 49Digital representation and data structures
A given encoding scheme assigns A = 00, B = 01, C = 10, and D = 11. What string does the encoded sequence 011011 represent?
- BCD Correct answer.
- ABC
- DDB
- BDD
Explanation
Split the fixed-length sequence into two-bit groups from left to right: 01, 10, 11. These map to B, C, and D respectively, giving BCD. Decoding data given an encoding scheme is a GACE Data objective.
Question 50Entity modelling, relational algebra and SQL
In relational database design, what does a 'Primärschlüssel' (primary key) uniquely identify?
- Each individual row (record) within a specific table Correct answer.
- The exact physical location of the database server
- The programming language used to build the database software
- The total number of tables in the entire database
Explanation
A primary key uniquely identifies each individual row (record) within a table, ensuring no two rows share the same primary key value.