0% found this document useful (0 votes)
2 views1 page

C Programming Complete Notes Part1

The document provides comprehensive notes on C programming, covering input/output functions, variable types, operators, control statements, memory management, pointers, dynamic memory allocation, and functions with recursion. It includes details on common format specifiers, variable declaration, and various types of operators and control structures. Additionally, it touches on advanced topics such as arrays and recursion techniques.

Uploaded by

kavyagoyal3772
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

C Programming Complete Notes Part1

The document provides comprehensive notes on C programming, covering input/output functions, variable types, operators, control statements, memory management, pointers, dynamic memory allocation, and functions with recursion. It includes details on common format specifiers, variable declaration, and various types of operators and control structures. Additionally, it touches on advanced topics such as arrays and recursion techniques.

Uploaded by

kavyagoyal3772
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

C Programming Complete Notes - Part 1

1. Input/Output
printf() prints output. scanf() reads input. Common format specifiers: %d int, %f float, %c char, %s
string. Escape sequences: \n, \t. printf returns chars printed; scanf returns successful inputs.

2. Variables/Data Types
Variables store data. int, char, float, double. Declare: int a=5;. Scope: local/global. Storage classes:
auto, static, extern, register.

3. Operators
Arithmetic + - * / %, relational == != > < >= <=, logical && || !, bitwise & | ^ ~ << >>, assignment =
+=, increment ++, conditional ?:, sizeof.

4. Control Statements
if, if-else, switch, for, while, do-while, break, continue, goto.

5. Memory
Program layout: Code, Data/BSS, Heap(dynamic), Stack(function calls). Stack is automatic; Heap
is manually managed.

6. Pointers
Pointer stores address. int *p=&a;. NULL pointer points nowhere. Void pointer generic. Wild pointer
uninitialized. Dangling pointer points to freed memory.

7. Dynamic Memory
malloc allocates uninitialized memory, calloc initializes to zero, realloc resizes, free releases
memory. Forgetting free causes memory leaks.

8. Functions & Recursion


Call by value copies data. Call by reference uses addresses. Recursion types: direct, indirect, head,
tail, tree, nested.

9. Arrays & Advanced


Prefix sum, sliding window, two pointers, bit manipulation, rotations, subarrays, pick/no-pick
recursion, bounded/unbounded recursion.

You might also like