Arrays in C

Arrays in C An array is a collection of similar data elements stored in contiguous memory locations under a single name. Instead of storing multiple variables, arrays allow you to store multiple values in one

Loops (for, while, do-while)

Loops in C (for, while, and do-while) Loops are used to execute a block of code repeatedly until a specified condition becomes false. C provides three types of loops: 1. for Loop The for loop

Control Statements (if, switch)

Control Statements in C (if and switch) Control statements determine the flow of execution in a C program. They allow the program to make decisions based on conditions. The two most commonly used decision-making statements

Input and Output (printf, scanf)

Input and Output in C (printf() and scanf()) Input and Output (I/O) are essential operations in C programming. The C Standard Library provides functions to read data from the user and display output on the

Constants and Operators

Constants and Operators in C Constants A constant is a fixed value that does not change during the execution of a program. Types of Constants 1. Integer Constants Whole numbers without a decimal point. Examples:

Variables and Data Types in C

Variables A variable is a named memory location used to store data. The value of a variable can change during program execution. Syntax Examples Or with initialization: Rules for Naming Variables Valid Variable Names Invalid

Structure of a C Program

A C program follows a standard structure that makes it organized, readable, and easy to maintain. 1. Documentation Section Example: 2. Link Section Example: 3. Definition Section Example: 4. Global Declaration Section Example: 5. Main()