These challenges simulate real-world coding problems where you must balance speed, memory, and code safety.
The Scenario: You are building a light-weight web server. You need to parse a "Query String" from a URL without using heavy external libraries.
"name=Gemini&age=2&status=active", extract the values and print them.strtok(). You must use pointers and manually find the = and & symbols.The Scenario: You are managing a dynamic list of sensor readings. Data comes in every second, and you must store it in a growing array.
realloc() to double its size.realloc() fails, you must not lose the original data. You must also free all memory at the end.The Scenario: You are working on a low-power IoT device with only 1 byte (8 bits) of RAM available for status updates.
uint8_t variable.toggle_bit(int position) and check_bit(int position) using Bitwise XOR and AND.The Scenario: In audio processing, data streams constantly. A "Circular Buffer" allows you to overwrite the oldest data once the array is full.
%) to manage the index wrap-around.The Scenario: Different CPUs store data differently. You need to write a program that detects how the current computer stores an integer.
| Challenge | C Concept Tested |
|---|---|
| String Parser | Pointer Arithmetic |
| Memory Detective | Dynamic Allocation (Heap) |
| Bit-Packed Flags | Bitwise Operators |