 Hello friends, I am Sanjay Gupta. In this video I am going to demonstrate you how you can print squares of natural numbers in reverse order using recursion in C. Before starting, you can subscribe my YouTube channel by clicking on the link which is available at the bottom right corner of this video. You can download my app Takimas that is available on Google Play. You can connect with me by following these details. You can see a code which is implemented in front of you. Its first statement is a comment which is showing objective of the code. Print squares of natural numbers in reverse order using recursion in C. For this purpose, I have included a header file stdr.h, then a function is declared void reverse int. This function will receive an integer as input. It will return nothing. Then main function is defined. It is containing two variable declarations n and s. Then printf scanf statements are written. Printf will display enter value of n. And scanf will read that value inside n variable. Then I have called reverse function. Inside this function, I have passed n as an argument. Then return 0 because return type of main is integer. That's why return 0 statement is written here. Then I have defined a function whose name is reverse. It is receiving an argument inside n variable. This function is called here inside its definition. That's why this function is known as recursive function. Whenever we call a function in its definition, those functions are known as recursive functions. So using recursion, it will display reverse of squares of natural numbers. Now you can see a base condition which is written here. It is n equals to 0. If it is true, then return statement will not return anything, but it will break the recursive calling of this function. If it is false, this base condition is false, then control will be transferred inside else. This else is printing n into n. It is n square. Then return statement is calling reverse function again by passing n minus 1. So every time this reverse function will be called by passing n minus 1 value and this recursion will take place. If this base condition is true, then that recursive process will be terminated. Otherwise it will be repeated. Now I am executing this code. I am entering 10 as value of n. You can see it is displaying reverse of natural numbers starting from 10, 9, 8, 7, 6, 5, 4, 3, 2 and 1. So all the natural numbers squares are printed in reverse order. So you can print squares of natural numbers in reverse order using recursion process which is implemented in C. I hope you have understood how you can perform this operation in C. Thank you for watching this video. If you want to watch more programming related videos, you can subscribe my YouTube channel.