C Pointer Assignments
Master pointers in C using this structured list of hands-on assignments. Includes array pointers, function pointers, and real-life use cases.
🔹 Section A: Basics of Pointers
- Print address and value using a pointer.
- Swap two variables using a pointer.
- Function to return max of two numbers using pointers.
- Increment number using pointer in a function.
- Reverse an array using pointer arithmetic.
🔹 Section B: Arrays and Pointers
- Print array using pointer notation.
- Sum all elements in array using pointers.
- Find largest/smallest in array using pointers.
- Reverse array using two-pointer approach.
- Sort array with pointer-based bubble sort.
🔹 Section C: Function Pointers
- Use function pointer for add/subtract/multiply.
- Calculator menu using function pointer array.
- Callback system with function pointer.
- Execute task based on function pointer choice.
- Shape area calculator using struct and pointer to function.
🔹 Section D: Pointer to Pointer & Strings
- Change variable value using pointer to pointer.
- Count vowels using string pointer.
- Concatenate two strings using pointers.
- Copy string manually using pointers.
- Manage 2D array of strings using char**.
🔹 Section E: Advanced Applications
- Use function pointer to select sorting algorithm.
- Menu program with function pointers: factorial, prime, fibo, palindrome.
- Virtual button click simulation using function pointers.
- Student record system with struct + function pointer logic.
- Signal-slot style event system using function pointer array.
🎁 Bonus Challenge
- Build your own calculator using: function pointers, loops, switch-case, conditions and pointer arrays.