C Language — Free Notes & Tutorial
Free C Language course on SikshaSarovar (Siksha Sarovar) — 32 structured lessons with notes, examples and a built-in online compiler. 100% free, no sign-up required.
This C Language course is part of Siksha Sarovar and is 100% free for students in India — no sign-up required to read. It contains 32 structured lessons with examples, and pairs with our free online compiler and AI tutor.
Course content (32 lessons)
- About This Course — Programming using 'C' Language — University Course This course provides a thorough introduction to the C programming language as taught in undergraduate university courses. The…
- Unit 1 — History and Features of C — History and Features of C Origin of C C was developed by Dennis Ritchie at Bell Labs between 1969 and 1973 . It grew out of the B language (itself derived from BCPL) and was first…
- Unit 1 — Data Types and Variables — Data Types and Variables in C What is a Data Type? A data type specifies the type of data a variable can hold, the amount of memory it occupies, and the operations that can be…
- Unit 1 — Operators in C — Operators in C An operator is a symbol that tells the compiler to perform a specific operation on operands. --- Categories of Operators 1. Arithmetic Operators Operator Meaning…
- Unit 1 — Input and Output in C — Input and Output in C C handles I/O through the stdio.h (Standard Input/Output) library. --- printf() — Formatted Output Format specifiers: Specifier Type Example -----------…
- Unit 1 — Control Structures — Control Structures in C Control structures determine the flow of execution of a program. --- 1. if Statement 2. if-else Statement 3. if-else-if Ladder 4. Nested if --- 5. switch…
- Unit 1 — Jump Statements — Jump Statements in C Jump statements transfer control to another part of the program, breaking the normal sequential flow. --- 1. break Exits the nearest enclosing loop or switch…
- Unit 2 — Functions: Definition and Calling — Functions in C — Basics A function is a self-contained block of code that performs a specific task. Functions make programs modular, reusable, and easier to debug. --- Types of…
- Unit 2 — Recursion — Recursion in C Recursion is a technique where a function calls itself to solve a problem. Every recursive function must have: 1. A base case — condition to stop recursion 2. A…
- Unit 2 — Preprocessor Directives — Preprocessor Directives in C The C Preprocessor processes source code before compilation . Directives start with and are not C statements (no semicolon needed). --- 1. include…
- Unit 2 — Storage Classes — Storage Classes in C A storage class defines the scope (visibility), lifetime (duration), and default initial value of a variable. --- The Four Storage Classes 1. auto - Default…
- Unit 2 — Arrays in C — Arrays in C An array is a collection of elements of the same data type stored in contiguous memory locations, accessed using an index. --- 1. One-Dimensional Arrays Declaration:…
- Unit 2 — Pointers in C — Pointers in C A pointer is a variable that stores the memory address of another variable. --- Pointer Basics Operators: - & (address-of) — gives the address of a variable -…
- Unit 3 — Structures — Structures in C A structure is a user-defined data type that groups variables of different data types under a single name. Each variable in a structure is called a member . ---…
- Unit 3 — Unions — Unions in C A union is a user-defined data type similar to a structure, but all members share the same memory location . The size of a union is equal to the size of its largest…
- Unit 3 — Enums and Typedef — Enums and Typedef in C Enumeration (enum) An enum is a user-defined data type consisting of named integer constants. It improves code readability. Syntax: Example: Custom values:…
- Unit 3 — File Handling — File Handling in C File handling allows C programs to read from and write to files on disk, enabling permanent data storage. --- File Pointer All file operations use a FILE…
- Unit 4 — Standard Library: stdio.h — Standard Library: stdio.h The stdio.h (Standard Input/Output) header provides functions for reading and writing data to streams (console, files). --- Console I/O Functions…
- Unit 4 — Standard Library: stdlib.h — Standard Library: stdlib.h The stdlib.h header provides general-purpose functions for memory management, type conversions, random numbers, and program control. --- Memory…
- Unit 4 — Standard Library: string.h — Standard Library: string.h The string.h header provides functions for manipulating C strings (null-terminated character arrays). --- String Length --- String Copy --- String…
- Unit 4 — Standard Library: math.h — Standard Library: math.h The math.h header provides mathematical functions. Compile with -lm flag on Linux/GCC. --- Basic Functions Function Description Example ----------…
- Unit 4 — Standard Library: ctype.h — Standard Library: ctype.h The ctype.h header provides functions for character classification and conversion . All functions take an int (character value) as argument. ---…
- Unit 4 — Command-Line Arguments — Command-Line Arguments in C C programs can accept arguments from the command line using argc and argv parameters of the main function. --- Syntax Parameter Description -----------…
- Unit 4 — Standard Library: time.h — Standard Library: time.h The time.h header provides functions for working with dates and times . --- Key Types Type Description ------ ------------- time t Integer type…
- Unit 1 — Type Conversion and Casting — Type Conversion and Casting in C In C, values of one data type can be converted to another. There are two kinds of conversions: implicit (automatic) and explicit (casting). ---…
- Unit 1 — Loop Patterns and Nested Loops — Loop Patterns and Nested Loops in C Nested loops are loops placed inside other loops. They are commonly used for working with 2D data and printing patterns. --- Nested Loop Syntax…
- Unit 1 — Scope and Lifetime of Variables — Scope and Lifetime of Variables in C Scope determines where a variable can be accessed. Lifetime determines how long a variable exists in memory. --- Types of Scope 1. Block Scope…
- Unit 2 — Function Pointers and Advanced Pointers — Function Pointers and Advanced Pointers in C Function Pointers A function pointer stores the address of a function and allows calling it indirectly. Syntax: Example: --- Array of…
- Unit 2 — Dynamic Memory Allocation — Dynamic Memory Allocation in C Dynamic memory allocation allows programs to request memory at run time rather than compile time. This is managed using functions from stdlib.h .…
- Unit 3 — Bit Fields and Miscellaneous — Bit Fields in C Structures A bit field is a member of a structure that occupies a specified number of bits rather than full bytes. Bit fields are used to save memory when storing…
- Unit 4 — Error Handling in C — Error Handling in C C does not have built-in exception handling like C++ or Java. Instead, error handling is done through return values , errno , and error-reporting functions.…
- Previous Year Questions — C Language — Previous Year Questions PYQ papers for this course will be added here soon. Check back later for: - End Term Examination papers - Mid Term papers - Important…
Unit 1 — History and Features of C
History and Features of C
Origin of C
C was developed by Dennis Ritchie at Bell Labs between 1969 and 1973. It grew out of the B language (itself derived from BCPL) and was first used to rewrite the UNIX operating system.
Timeline:
| Year | Event |
|---|---|
| 1967 | BCPL developed by Martin Richards |
| 1969 | B language by Ken Thompson |
| 1972 | C language by Dennis Ritchie |
| 1978 | "The C Programming Language" book (K&R C) |
| 1989 | ANSI C (C89) standardised |
| 1999 | C99 standard released |
| 2011 | C11 standard released |
---
Why Learn C?
- C is a middle-level language — it has features of both high-level and low-level languages.
- It is the foundation of many modern languages (C++, Java, Python runtime is in C).
- Used in operating systems, embedded systems, compilers, and more.
---
Features of C
- Simple — easy to learn with a small set of keywords (32 in C89).
- Portable — programs can run on different hardware with minimal changes.
- Fast — compiled language with direct memory access.
- Structured — supports functions and modular programming.
- Rich Library — vast standard library for I/O, string handling, math.
- Pointers — direct memory manipulation via pointers.
- Extensible — you can add your own functions to the library.
---
Structure of a C Program
/* Documentation Section */
#include <stdio.h> /* Preprocessor Directive */
int main() { /* Main Function */
printf("Hello, World!\n");
return 0;
}
Sections of a C program:
- Documentation — comments explaining the program
- Preprocessor directives —
#include,#define - Global declarations — variables/functions accessible everywhere
- main() — entry point of every C program
- User-defined functions — additional functions
---
Compilation Process
- Source Code (.c file) → Preprocessor → Expanded Source
- Expanded Source → Compiler → Assembly Code
- Assembly Code → Assembler → Object Code (.obj)
- Object Code + Libraries → Linker → Executable (.exe)
Frequently asked questions
Is the C Language course really free?
Yes. The entire C Language course on Siksha Sarovar is free to read with no account required. You can optionally sign in with Google to save your progress.
Do I get a certificate for C Language?
Yes — finish the lessons and pass the quiz to earn a free, verifiable certificate you can share on LinkedIn or with recruiters.
Can I run code while learning?
Yes. The built-in online compiler runs C, C++, Python, Java, PHP, JavaScript, C# and SQL directly in your browser — no installation needed.