Mastering Memory Addressing in C: Practical Pointer Exercises
Direct Value Manipulation and Sorting
Pointers allow functions to modify variables in the caller's scope. A common exercise involves ordering scalar values without returning a new structure. The following implementation accepts addresses of three integers and rearranges their values in ascending order using a helper swap routine.
void exchange( ...
Posted on Thu, 25 Jun 2026 16:26:16 +0000 by atholon
Array Manipulation Techniques in C++
Binary Search Implementation
Element Removal Optimization
Sorted Squares Generation
Spiral Matrix Construction
Binary Search Implementation
Binary seearch implementation requires careful consideration of boundary conditions:
Loop condition: left < right vs left <= right
Right boundary update: right = middle vs right = middle ...
Posted on Sat, 16 May 2026 15:05:13 +0000 by hiprakhar