Programming and Digital Systems Flashcards
7 cards from real ICAS practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Programming and Digital Systems flashcards as text
Which data structure uses a Last-In, First-Out (LIFO) principle?
Answer: Stack
A stack operates on LIFO, meaning the last element added is the first one removed.
What does the term 'bug' mean in programming?
Answer: An error or flaw in the program
A bug is any error or unintended behavior in a program that causes it to produce incorrect results.
In binary, what is the value of 1011?
Answer: 11
1011 in binary = 8 + 0 + 2 + 1 = 11 in decimal.
Which type of loop is guaranteed to execute its body at least once?
Answer: do-while loop
A do-while loop checks its condition after executing the body, ensuring at least one execution.
What is an algorithm?
Answer: A step-by-step set of instructions to solve a problem
An algorithm is a finite, ordered set of instructions designed to solve a specific problem or perform a task.
Which of the following best describes 'pseudocode'?
Answer: An informal description of a program's logic
Pseudocode is a plain-language description of programming logic, not tied to any specific language syntax.
What does a compiler do?
Answer: Translates high-level code into machine code
A compiler translates the entire source code written in a high-level language into machine-readable code before execution.