This repository contains a comprehensive set of C programming examples, ranging from beginner topics to advanced data structures and algorithms.
Each file is prefixed with a number to indicate topic order for easier navigation:
.
├── 1_declarations_definitions.c
├── 2_types_literals_objects_values.c
├── 3_type_conversion.c
├── 4_operators_expressions.c
├── 5_statements.c
├── 6_functions.c
├── 7_qualifiers_modifiers_storage_classes.c
├── 8_arrays.c
├── 9_structures_unions_enums.c
├── 10_pointers_references.c
├── 11_function_pointers.c
├── 12_callback_functions.c
├── 13_memory_functions.c
├── 14_def_preprocessor_basics.c
├── 15_compiler_attributes.c
├── 16_linked_lists.c
├── 17_stacks_arrays.c
├── 18_stacks_linked_lists.c
├── 19_queue_arrays.c
├── 20_queue_linked_lists.c
├── 21_circular_queue_array.c
├── 22_hash_tables.c
├── 23_hash_tables_impl.c
├── 24_doubly_linked_lists.c
├── 25_trees.c
├── 26_bfs_dfs_tree_traversal.c
├── 27_heaps.c
├── 28_generate_subarrays_substrings_patterns.c
├── 29_introduction_to_graphs.c
├── 30_double_pointers.c
├── 31_file_operations.c
├── 32_sorting_algorithms.c
├── 33_arrays_pointers.c
├── program.txt
├── program.bin
├── a.out
└── README.md
- GCC (GNU Compiler Collection)
- Terminal (Linux/macOS) or Command Prompt/WSL (Windows)
To compile and run a specific file:
gcc 1_declarations_definitions.c -o output
./output
Or for another example:
gcc 16_linked_lists.c -o linked_lists
./linked_lists
- ✅ Variable Declarations & Definitions
- ✅ Data Types, Literals, and Type Conversion
- ✅ Operators and Expressions
- ✅ Control Flow and Statements
- ✅ Functions and Recursion
- ✅ Arrays, Pointers, and Memory
- ✅ Structures, Unions, Enums
- ✅ Function & Callback Pointers
- ✅ Preprocessor and Compiler Attributes
- ✅ Linked Lists (Singly, Doubly)
- ✅ Stacks and Queues (Array & Linked)
- ✅ Trees, DFS/BFS Traversal
- ✅ Heaps and Sorting Algorithms
- ✅ Hash Tables and Graphs
- ✅ File Handling
- ✅ Advanced Pointer Concepts
- GeeksforGeeks - C Programming
- C Programming Tutorial - Tutorialspoint
- Learn-C.org - Interactive Learning
Feel free to fork and contribute! Add new files, fix bugs, or improve the existing implementations.