A diagram that visually represents the sequence of steps in a program or process.
7
New cards
What is a variable?
A storage location identified by a name that can hold different values during the execution of a program.
8
New cards
What is the difference between a variable and a constant?
A variable's value can change, while a constant's value remains fixed throughout the program.
9
New cards
What are the most common data types used in programming?
Integers, floating-point numbers, characters, strings, and booleans.
10
New cards
What is type casting?
Converting one data type into another (e.g., from int to double).
11
New cards
What is an escape sequence?
A special character that starts with a backslash (") and represents something other than a literal character.
12
New cards
What does the else statement do in a conditional structure?
Defines the block of code to execute if the if condition is false.
13
New cards
What is the syntax for a for loop in C++?
for(initialization; condition; increment/decrement) { // Loop body }
14
New cards
What is function overloading?
Defining multiple functions with the same name but different parameter lists.
15
New cards
What is the difference between a local variable and a global variable?
A local variable is declared inside a function and can only be accessed within that function. A global variable is declared outside any function and can be accessed anywhere in the program.
16
New cards
What is recursion in programming?
Recursion is when a function calls itself in order to solve a problem.
17
New cards
What is the significance of void as a return type for functions?
void means that the function does not return any value.