 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can calculate some of the cubes 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 Takimis available on Google Play. You can connect with me by following these details. Now coming onto the topic. For program implementation, first I am including a header file stdr.h. Then a function. Sum is declared here. This statement is known as function declaration. This statement will receive an integer as input and it will return an integer as output. Now main function definition. Inside it, I am declaring two variables n and s. Then printf statement having a text entered value of n that will be displayed on console. The entered value will be received or will be entered by the scanner function inside n variable. Now I am calling some function using s equals to sum of n. This statement is known as function call. The result of this function call will be stored inside s. So I have to print some using this printf statement and at last return 0 because return type of main function is integer. Now after complete implementation of main, I am going to define definition of sum. So this block will be known as function definition. So this function will be containing definition of a sum function which will be calculating sum of cubes of natural numbers. So here first I have to implement a base condition. This base condition is n equals to 1. If it is true then it will return 1. If it is false then it will return n into n into n plus sum of n minus 1. This return statement is containing recursive call. So recursive function call for sum is available here. So recursion means whenever a function definition calls itself then that process is known as recursion. So you can see here definition of sum is available and inside this definition sum is called again and this if is containing base condition. Base condition is responsible for termination of recursive function call. So this base condition is compulsory. If it is not available then recursion will become infinite. So this is complete implementation which will calculate sum of cubes of all the natural numbers and the limit of natural number will be provided by the user. That limit will be entered by this printf and scanf statement. Now I am going to execute this code. I am entering 5. You can see the output 225 is available. If you calculate this at your own like 1 cube plus 2 cube plus 3 cube plus 4 cube plus 5 cube then result will be the same. So I hope with the help of this example you have understood how you can calculate sum of cubes of all the natural numbers with the help of recursion in C. I hope you want to watch more programming related videos. If you want to do so you can subscribe my YouTube channel. Thank you for watching this video.