 Hello friends, I am Sanjay Gupta. In this video I am going to demonstrate you how you can find out the greatest common divisor that is GCD 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 demonstration. Here you can see I have written a comment program to find out GCD of a given number using recursion in C. I am including a header file stdio.h. Then I have declared a function GCD. This statement is function declaration. In this function, two arguments of integer type will be passed and it will return an integer. Then inside main three variables A, B and result are declared. Using printf enter two numbers this message will be displayed on console and scanf will read all two numbers inside A and B. Then GCD this is function call. GCD function is called here and two arguments A and B are passed and the result will be assigned into result variable. This result will be displayed using printf statement. Then return zero is return because return type of main is integer. After main function GCD function is defined. This is function definition. This function is containing a loop which is checking if A is not equals to B then this loop will repeat and inside this loop GCD function is called. So this statement is recursive function call. Similar to this, this is also recursive function call. So here two recursive function calls are available which are based on this if condition. If A is greater than B then return GCD A minus B and B these two arguments will be passed. If this condition is false then inside else return GCD A comma B minus A these two arguments will be passed. This process will repeat while A is not equals to B. If this condition is false then at last value of A will be returned. That will be received by this result variable and this result will be displayed on console using printf. So this is all about how to calculate GCD using recursion. GCD stands for greatest common divisor. Now I am executing this code. I am entering two numbers. First is 100, second one is 50. You can see the greatest common divisor for these two numbers is 50. It means both the numbers can be successfully divided by 50. So I hope you have understood how you can implement GCD program using recursion in C. If you want to watch more programming related videos, you can subscribe my YouTube channel. That is Sanjay Gupta underscore tax school. Thank you for watching this video.