Variadic Sum Function

Hard
3 views 23 Jan 2026
Create a function like printf that returns the sum of a variable number of integers. The first parameter will be the count, the rest will be numbers. Do that....

Static Local Persistence

Hard
2 views 23 Jan 2026
Create a function that generates the Fibonacci sequence. Store the previous two values ​​in static variables. Return the next Fibonacci number on every call....

Recursive String Reverse

Hard
2 views 23 Jan 2026
Use WITHOUT loop recursively to reverse the string. Clearly define base case and recursive case. Compare with Iterative approach....

Callback Sort

Medium
5 views 23 Jan 2026
Create a generic function to sort the array that accepts a comparison function as a callback. Implement both ascending and descending using different callbacks....

Function Pointer Calculator

Medium
3 views 23 Jan 2026
Create char array of functions: add, subtract, multiply, divide. Take operator input from the user and call the corresponding function pointer. Dynamic function selection demo....

Array Statistics Package

Medium
2 views 23 Jan 2026
By passing an array to the function. Calculate Function: sum, average, min, max, range. Return values ​​simultaneously using pointers (multiple output parameters)....

Factorial Three Ways

Easy
3 views 23 Jan 2026
Calculate factorials using three methods: root-recursive, recursive, and tail-recursive. Examine the efficiency of each method for large numbers....

Swap Simulator

Easy
3 views 23 Jan 2026
Create two functions - swapByValue() and swapByReference(). In main, test both on the same numbers. Explain why the first won't work and why the second will....

Prime Checker Library

Easy
4 views 23 Jan 2026
Create a function isPrime() to check the number. Create another function printPrimesInRange() to print all the primes in the range using isPrime(). Example of modular code....

Power Function Recursive

Easy
2 views 23 Jan 2026
Create a recursive function to calculate x^n. If n is negative, return 1/x^|n|. If n=0, return 1. Track the depth of the recursion....