C Program to reverse the digits of a number using recursion

The following is a C program to reverse the digits of a number using recursion:

Expected Output:

1st run:

2nd run:

How it works

The following figure shows how the evaluation of reverse_num(123) takes place:

Evaluation of reverse_num(123)


Recommended Reading:

Leave a Comment

%d bloggers like this: