What is a variable?
A: A named memory location that stores data which can change during the program.
What is a constant?
A: A value that cannot change while the program runs.
What is a data type?
A: The kind of data a variable stores, e.g., integer, real/float, Boolean, string, character.
What is an integer?
A: A whole number (e.g., 5, –3, 0).
What is a real/float?
A: A number with decimals (e.g., 3.14).
What is a Boolean?
A: A data type with two values: TRUE or FALSE.
What is a string?
A: Text or characters, e.g., “Hello”.
What is sequence?
A: Instructions executed one after another in order.
What is selection?
A: Making decisions using IF, ELSE, or CASE statements.
What is iteration?
A: Repeating code using loops (FOR, WHILE, REPEAT UNTIL).
What is a REPEAT UNTIL loop?
A: Repeats code until the condition becomes true (runs at least once).
What is a FOR loop used for?
A: Repeating code a set number of times.
What is a WHILE loop used for?
A: Repeating code while a condition is true.
What is a function?
A: A subprogram that returns a value.
What is a procedure?
A: A subprogram that performs a task but does not return a value.
What is a parameter?
A: A variable given to a subprogram (like an input).
What is a global variable?
A: A variable that can be used anywhere in the program.
Why are local variables preferred?
A: They prevent unexpected changes and make code easier to debug.
What is a local variable?
A: A variable that exists only inside one subprogram.
What is string concatenation?
A: Joining strings together, e.g., “Hello “ + “World”.
What is string slicing?
A: Taking part of a string, e.g., name[0:3].
What is an array/list?
A: A data structure that stores multiple items under one name.
What is an index in an array?
A: The position of an item (usually starting at 0).
What is SQL?
A: SQL (Structured Query Language) is a language used to store, manage, and manipulate data in relational databases. It includes commands like SELECT, INSERT, UPDATE, and DELETE to interact with tables.