What is a program?
A set of instructions that a computer executes to perform a task.
What is C?
A general-purpose programming language often used for systems programming and as an introduction to programming in CS50.
What is a compiler?
A program that translates source code into machine code that the computer can execute.
What is the difference between source code and executable code?
Source code is human-readable code written by a programmer; executable code is machine-readable code the computer runs.
What is a variable in C?
A named storage location in memory that can hold a value of a specific type.
What are the basic data types in C?
int, float, double, char, and bool (via stdbool.h).
What is an int in C?
A data type representing whole numbers.
What is a float in C?
A data type representing numbers with decimal points (single precision).
What is a double in C?
A data type representing numbers with decimal points (double precision).
What is a char in C?
A data type representing a single character.
What is a boolean in C?
A data type representing true or false values (via stdbool.h).
What is a function in C?
A reusable block of code that performs a specific task.
What is main() in C?
The entry point function where execution of a C program begins.
What is a return value in C?
A value a function sends back to the caller to indicate success, failure, or a result.
What is printf()?
A C standard library function used to print formatted output to the console.
What is scanf()?
A C standard library function used to read formatted input from the user.
What is a constant in C?
A value that cannot be changed during program execution (declared with const).
What is an array in C?
A collection of elements of the same type stored contiguously in memory.
What is a pointer in C?
A variable that stores the memory address of another variable.
What is the difference between stack and heap memory?
Stack: memory for local variables with automatic lifetime; Heap: memory allocated dynamically at runtime.
What is memory allocation in C?
Reserving memory during program execution, usually with malloc() and freed with free().
What is segmentation fault?
An error that occurs when a program tries to access memory it shouldn’t.
What is a comment in C?
Text in the code ignored by the compiler, used to explain code (// for single-line, /* */ for multi-line).
What is an operator in C?
A symbol that performs operations on variables and values (e.g., +, -, *, /, %).