Skip to content

4ntiR0id/The-C-Programming-Language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 

Repository files navigation

> The C Programming Language Documentation <

About The C Programming Language :

  • C was created by Dennis M. Ritchie in 1972 at Bell Laboratories to develop the UNIX operating system. It combines low-level memory control with high-level programming features, making it ideal for systems programming and portable across hardware. C laid the foundation for many modern languages like C++, Java, and C#.

Chapter : 1. Introduction

1.1 Getting Started :

  • The first C program
  • Program structure
  • Compilation and execution

1.2 Variables and Arithmetic Expressions :

  • Variables
  • Arithmetic operators
  • Comments
  • The while loop

1.3 The for Statement :

  • Structure of the for loop
  • Comparison between for and while

1.4 Symbolic Constants :

  • Defining constants using #define

1.5 Character Input and Output :

  • getchar
  • putchar

1.6 Arrays :

  • Array declaration
  • Frequency counting examples

1.7 Functions :

  • Function definitions
  • Return values

1.8 Arguments – Call by Value :

  • Value passing mechanism
  • Difference between values and pointers

1.9 Character Arrays :

  • Strings
  • Null-terminated character arrays

1.10 External Variables and Scope :

  • External variables
  • Scope rules
  • Storage duration

Chapter : 2. Types, Operators, and Expressions

2.1 Variable Names :

  • Naming rules and conventions

2.2 Data Types and Sizes :

  • char
  • int
  • float
  • double
  • short and long

2.3 Constants :

  • Integer constants
  • Floating-point constants
  • Character constants

2.4 Declarations :

  • Variable declarations
  • Initialization

2.5 Arithmetic Operators :

  • + - - / %

2.6 Relational and Logical Operators :

  • < > <= >= == !=
  • && || !

2.7 Type Conversions :

  • Implicit conversions
  • Explicit casting

2.8 Increment and Decrement Operators :

  • ++ and --

2.9 Bitwise Operators :

  • & | ^ ~ << >>

2.10 Assignment Operators and Expressions :

  • Assignment operator =
  • Compound assignments (+=, -=, *=, /=)

2.11 Conditional Expressions :

  • The ternary operator ?:

2.12 Precedence and Order of Evaluation :

  • Operator precedence
  • Order of evaluation

Chapter : 3. Control Flow

3.1 Statements and Blocks :

  • Compound statements
  • Braces {}

3.2 If–Else :

  • Conditional execution

3.3 Else–If :

  • Multi-way decision chains

3.4 Switch :

  • switch statement
  • case labels
  • default case

3.5 Loops – While and For :

  • while
  • for

3.6 Do–While :

  • Differences from while

3.7 Break and Continue :

  • Loop control statements

3.8 Goto and Labels :

  • Unconditional branching
  • Restricted use cases

Chapter : 4. Functions and Program Structure

4.1 Basics of Functions :

  • Function definition
  • Return values

4.2 Functions Returning Non-integers :

  • Functions returning float and double

4.3 External Variables :

  • Shared global variables

4.4 Scope Rules :

  • Local vs. global scope

4.5 Header Files :

  • Organization of declarations

4.6 Static Variables :

  • Static local variables
  • Static global variables

4.7 Register Variables :

  • Performance hints

4.8 Block Structure :

  • Variables inside blocks

4.9 Initialization :

  • Variable initialization rules

4.10 Recursion :

  • Recursive function calls

Chapter : 5. Pointers and Arrays

5.1 Pointers and Addresses :

  • Address concept
  • & and * operators

5.2 Pointers and Function Arguments :

  • Call by reference

5.3 Pointers and Arrays :

  • Fundamental relationship

5.4 Address Arithmetic :

  • Pointer arithmetic

5.5 Character Pointers and Functions :

  • String handling

5.6 Pointer Arrays; Pointers to Pointers :

  • Arrays of pointers
  • Double pointers

5.7 Multi-dimensional Arrays :

  • Two-dimensional and higher arrays

5.8 Initialization of Pointer Arrays :

  • String tables

5.9 Pointers vs. Multi-dimensional Arrays :

  • Conceptual and practical differences

5.10 Command-line Arguments :

  • argc
  • argv

5.11 Pointers to Functions :

  • Function pointers
  • Callback mechanisms

Chapter : 6. Structures

6.1 Basics of Structures :

  • struct definition
  • Member access

6.2 Structures and Functions :

  • Passing structures to functions

6.3 Arrays of Structures :

  • Structured data collections

6.4 Pointers to Structures :

  • The -> operator

6.5 Self-referential Structures :

  • Linked lists

6.6 Table Lookup :

  • Practical examples

6.7 Typedef :

  • Type aliasing

6.8 Unions :

  • Memory sharing

6.9 Bit-fields :

  • Bit-level data representation

Chapter : 7. Input and Output

7.1 Standard Input and Output :

  • stdin
  • stdout

7.2 Formatted Output – printf :

  • Format control

7.3 Variable-length Argument Lists :

  • Internal mechanics of printf

7.4 Formatted Input – scanf :

  • Data input

7.5 File Access :

  • fopen
  • fclose

7.6 Error Handling :

  • Error detection and reporting

7.7 Line Input and Output :

  • fgets
  • fputs

7.8 Miscellaneous Functions :

  • Supporting I/O utilities

Chapter : 8. The UNIX System Interface

8.1 File Descriptors :

  • open
  • close

8.2 Low-level I/O – Read and Write :

  • read
  • write

8.3 Open, Creat, Close, Unlink :

  • File manipulation system calls

8.4 Random Access :

  • lseek

8.5 Example – An Implementation of fseek :

  • Low-level implementation example

Appendices

Appendix A – Reference Manual :

  • Lexical structure
  • Syntax
  • Semantics

Appendix B – Standard Library :

  • Standard I/O library
  • String handling functions
  • Mathematical functions
  • Utility routines

> The END <