




























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!





























Note: Questions cover fundamental programming concepts, logic, and scripting principles relevant to this foundational course.
TOPIC 1: Programming Fundamentals and Logic
Which programming paradigm emphasizes procedures and function calls? A) Object-oriented programming B) Functional programming C) Procedural programming D) Logical programming Answer: C Explanation: Procedural programming focuses on procedures or functions that operate on data, following a top-down approach.
B) A type of loop structure C) A mathematical operation D) A variable naming convention Answer: A Explanation: Boolean is a data type that can have only two values: true or false (or 1 and 0 in some languages).
TOPIC 2: Control Structures and Flow
Answer: A Explanation: An infinite loop occurs when the loop's termination condition is never met, causing it to run indefinitely until interrupted.
Explanation: A loop control variable is a variable whose value controls the execution of a loop, typically modified within the loop to eventually cause termination.
TOPIC 3: Functions and Modular Programming
Answer: C Explanation: Arguments are the actual values passed to a function when it's called. Parameters are the variables in the function definition that receive these values.
C) Passing only constants to functions D) Passing variables without specifying type Answer: B Explanation: In pass-by-value, a copy of the argument's value is passed to the function, so changes to the parameter don't affect the original argument.
Explanation: The base case is the condition that stops the recursion by returning a value without making another recursive call, preventing infinite recursion.
C) Array D) Set Answer: B Explanation: A queue follows FIFO ordering: the first element added is the first one removed, like a line of people waiting.
TOPIC 5: Object-Oriented Programming Concepts