 Hello friends, I am Sanjay Gupta. In this video I am going to demonstrate you how you can print squares of natural numbers 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 Techimus that is available on Google Play. You can connect with me by following these details which are available in front of you. Now coming on to the code, you can see first statement is a commit which is showing the objective print squares of natural numbers using recursion in C. Then I have included a header file stdio.h, then display function is declared, its return type is void and it is receiving two arguments of integer type. Then main function is defined, here two variables n and i are declared, i is initialized with 1, then value of n is entered by the user and that will be received by scanf statement inside n, then display function is called display function is receiving two arguments i and n. So i is mentioning the beginning of the natural number and n is mentioning ending. So i is initialized by 1 and n is provided by the user. Then return zero statement because main return type is int, so return zero is available here. When display function will be called, control will be transferred to this definition. Here value of i is received inside i and value of n is received inside n. Then you can see inside this display function definition, display function is called here. So whenever we call a function inside its definition, that function is converted into recursive function. So this calling is recursive function call. So here a base condition is available, which is i equals to n. So if i is equals to n, then i into i will be displayed and recursive calling will be terminated. Otherwise control will be transferred inside else. Else will display i into i, that is square of natural number and then display function will be called by incrementing 1 into i and second argument n. So this is a complete implementation of the program which will display squares of natural number. Now I am executing this code. I am entering 10 as n. You can see the output. Squares of 1, 2, 3, 4 up to 10 are displayed here. If you enter more than 10 value, then also it will work. So if initially if you want to check this base condition, then it is false because i is 1 and n is 10. So else is executed first time, which is displaying 1 into 1. Then display function is called here, which is passing 2 and 10. Again 2 and 10 both are unequal. So 2 into 2, 4 is displayed and 3 and 10 are passed here. This way recursive function will take, recursive function calling will take place and this process will continue when this base condition will be true. Then only last time squares of i will be displayed and the recursive calling process will be terminated. I hope you have understood how you can print squares of natural numbers using recursion in C with the help of this demonstration. If you want to watch more programming related videos, you can subscribe my youtube channel, follow my youtube channel. Thank you for watching this video.