Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

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)

  1. 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…
  2. 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…
  3. 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…
  4. 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…
  5. 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 -----------…
  6. 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…
  7. 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…
  8. 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…
  9. 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…
  10. 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…
  11. 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…
  12. 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:…
  13. 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 -…
  14. 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 . ---…
  15. 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…
  16. 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:…
  17. 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…
  18. 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…
  19. 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…
  20. 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…
  21. 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 ----------…
  22. 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. ---…
  23. 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 -----------…
  24. 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…
  25. 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). ---…
  26. 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…
  27. 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…
  28. 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…
  29. 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 .…
  30. 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…
  31. 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.…
  32. 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:

YearEvent
1967BCPL developed by Martin Richards
1969B language by Ken Thompson
1972C language by Dennis Ritchie
1978"The C Programming Language" book (K&R C)
1989ANSI C (C89) standardised
1999C99 standard released
2011C11 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

  1. Simple — easy to learn with a small set of keywords (32 in C89).
  2. Portable — programs can run on different hardware with minimal changes.
  3. Fast — compiled language with direct memory access.
  4. Structured — supports functions and modular programming.
  5. Rich Library — vast standard library for I/O, string handling, math.
  6. Pointers — direct memory manipulation via pointers.
  7. 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

  1. Source Code (.c file) → Preprocessor → Expanded Source
  2. Expanded Source → Compiler → Assembly Code
  3. Assembly Code → Assembler → Object Code (.obj)
  4. Object Code + Libraries → Linker → Executable (.exe)

Continue reading: Unit 1 — History and Features of C →

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.