 Hello friends, I am Sanjay Gupta. In this video I am going to demonstrate you how you can print reverse of natural numbers as well as some of all the natural numbers using recursion in C. Before starting, you can subscribe my YouTube channel by clicking on the link which is available at bottom right corner of this video. You can download my app TechMS that contains various programming tutorials which is available on Google Play. You can connect with me by following these details which are available in front of you. Now I will be implementing a code for you which will print reverse of natural numbers and some of natural numbers. So this is a comment which is showing objective of this code. Now I am including a header file stdio.h then a function is declared whose name is reverse. It will receive an integer as input and it will return an integer as output. This statement is known as function declaration. Then main function inside main function two variables are declared n and s. Then printf statement it will show a message enter value of n on console. Then using scanf the entered number will be received inside n variable. Then a function is called which is s equals to reverse of n. So this function will print reverse as well as it will return some of all the natural numbers. So this statement is function call and the sum will be received inside s. So I am going to display that value using printf statement and then return 0 because return type of main function is integer. This is complete definition of main. Now I am going to implement definition of reverse function. This block will be known as function definition. Inside this function definition I have to implement a base condition which will be terminating recursive calling of this function. Now this if is containing base condition. If this base condition is true then return statement will return 1. Otherwise control will be transferred inside else. Inside else first I am going to display value of n. Then I am calling return n plus reverse of n minus 1. This is containing recursive function call. So friends this base condition will be checked first. If it is true it will return 1. Otherwise else will be executed using this printf reverse of natural numbers sorry reverse of natural numbers will be displayed on console and using this return statement all the natural numbers will be added. Now first I am going to execute this code. I am entering 5 as input. You can see the output 5 4 3 2. It is not displaying 1. So here I have to change this base condition because when n is 1 this recursive call has not performed. So I want to perform it. So I am mentioning a base condition that is n equals to 0. Again I am executing this code. Now you can see a proper output 5 4 3 2 1 and some is 15. So friends with the help of this demonstration I hope you have understood how you can print reverse of natural number as well as you can print sum of all the natural numbers on console. If you want to watch more programming related videos you can subscribe my youtube channel. Thank you for watching this video.