



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




What are simple types?
Answer: Types with no internal structure beyond basic values (int, char, boolean, enums).
What is an enumerated type?
Answer: A type with explicitly listed named values.
What is a subrange type?
Answer: A type defined as a contiguous subset of another simple type.
What is structural type equivalence?
Answer: Two types are equivalent if they have the same structure.
What is name type equivalence?
Answer: Two types are equivalent only if they use the same type name.
What is a Cartesian product type?
Answer: A type formed from ordered pairs (implemented as structs or records).
What is a union type?
Answer: A type allowing values from multiple alternative types.
What is a discriminated union?
Answer: A union with a tag identifying which value type is stored.
What is an undiscriminated union?
Answer: A union without tags, unsafe because the type isn't known.
What is a pointer type?
Answer: A type whose values are memory addresses referring to another type.
What is a reference type?
Answer: Like a pointer but not manipulated directly (e.g., Java objects).
What is a recursive type?
Answer: A type defined in terms of itself (linked lists, trees).
What is parametric polymorphism?
Answer: Functions or types that work for any type parameter (generics).
What is overloading?
Answer: Same operator/function name used for different types.
What is implicit type conversion?
Answer: Automatic conversion inserted by the translator.
What is explicit type conversion?
Answer: A cast written explicitly by the programmer.
What is an expression?
Answer: Code that returns a value and ideally has no side effects.
What is a case/switch statement?
Answer: A multi-way branch based on a selector value.
What is a while loop?
Answer: Repeats while a condition is true.
What is a do-while loop?
Answer: Executes the loop body at least once before checking the condition.
What is a for loop?
Answer: Loop containing initialization, condition, and update expressions.
What is continue?
Answer: Skips the remaining loop body and starts the next iteration.
What is break?
Answer: Terminates the closest loop immediately.
What is the loop-and-a-half problem?
Answer: A loop that naturally needs an early exit in the middle; break solves it.
What is an exception?
Answer: An event indicating an error or unusual situation during execution.
What is raising an exception?
Answer: Triggering an exception event to interrupt normal control flow.
What is an exception handler?
Answer: Code that catches and processes an exception.
What is propagation of exceptions?
Answer: Searching up the call stack for a matching handler.
What is stack unwinding?
Answer: Exiting activation records while searching for a handler.
What is the termination model?
Answer: After handling an exception, execution continues after the handling block.
What is the resumption model?
Answer: Execution restarts from where the exception occurred.
What is a procedure?
Answer: A collection of computations executed when called.
What is a function?
Answer: A procedure that returns a value.
What is a procedure specification?
Answer: Includes name, parameters, and return type.
What is a procedure body?
Answer: The block of statements the procedure executes.
What is an access link?
Answer: Points to the lexical (defining) environment for nested procedures.
What is access chaining?
Answer: Following multiple access links to reach a nonlocal variable.
What is a static environment?
Answer: All memory allocated at load time; no recursion.