Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

C_Programming_Notes

Uploaded by

Aarav Saroliya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

C_Programming_Notes

Uploaded by

Aarav Saroliya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

C Programming Notes

1. Introduction to C Programming

- Basics of C: C is a general-purpose programming language developed in 1972.

- Structure of a C program: Every C program includes functions and statements.

- Data types and variables: C supports several data types like int, float, char, etc.

2. Control Structures

- Conditional statements: if, switch (used for decision making).

- Loops: for, while, and do-while (used for repeated execution).

3. Functions

- Function declaration and definition: Functions in C allow code reuse.

- Recursion: A function calling itself to solve a problem.

4. Arrays and Strings

- 1D and 2D arrays: Arrays are used to store multiple elements of the same type.

- String handling functions: Functions like strcpy(), strcat(), etc. to manipulate strings.

5. Pointers
- Introduction to pointers: Pointers hold the address of another variable.

- Pointers and arrays: Arrays are closely related to pointers in C.

6. Structures and Unions

- Defining structures: Structures allow grouping of different data types.

- Using structures and unions: Structures store multiple members, while unions store one member

at a time.

7. File Handling

- Reading from and writing to files: fopen(), fclose(), fscanf(), fprintf(), etc.

8. Advanced Topics

- Dynamic memory allocation: malloc(), calloc(), realloc() to allocate memory at runtime.

- Memory management: free() function to release allocated memory.

You might also like