 Hello friends! I am Sanjay Gupta. In this video, I am going to demonstrate you how you can calculate area and circumference of circle using macro in C programming. Before starting, you can note how you can search my YouTube channel. You can type my name Sanjay Gupta in YouTube search. My channel will be available there. You can watch various programming related videos here. Now I am going to implement solution of this problem. So first of all, I have included a header file that is stdio.h. Now I am going to define three macros. So first macro is p i. Name of macro is pi which is implemented with the help of hash defined and its replacement value will be 3.141. So for calculation of area and circumferences, circumference of circle, I will be using pi. So I have already defined it with the help of macro. So I will be using pi and it will be replaced with its value that is 3.141. Now I am going to implement second macro with the help of hash defined. Name of macro is area. Its parameter is r. So here I have implemented its replacement expression that is pi into r into r and this pi will be automatically replaced with 3.141 that is already defined with a macro. Now another macro circumference is defined whose parameter is r and its replacement expression is 2 into pi into r. So this way I have implemented three macros in this program. Now I am going to define main function. Here I have declared three variables and I am using float in place of int. So variable r is for radius a for area c for circumference. Now with the help of printf I am going to display the message enter radius and the entered value will be received through scanf inside r variable. Now I have to calculate area first. So I am calling a equals to area. So I have used first macro here now I am going to use second macro. So this way I have used both the macros and both macros will be internally using pi macro for using 3.141 as pi value. Now I can print the output on output screen with the help of printf statement. So this way I have used three macros for calculation of area and sorry area and circumference of circle. Now I am going to execute this code. You can see it is asking for radius. I am entering 5 sorry in place of percent f I have used sorry in place of percent f I have used percent d that's why it is showing 00. Again I am going to execute this code. I am entering 5. You can see the output. It is showing area 78.525002 and circumference 331.410000. So after point it is showing six digits. So if you want to reduce that number you can use percent point two f. So now it will be displaying only two digits after decimal point. Again executing this code. I am entering 5 as radius. You can see the output area is 78.53 and circumference is 31.41. So this way I have used three macros for calculation of area and circumference of circle in C programming. I hope you have understood how I have implemented this code in front of you. If you want to watch more programming related videos you can search my name Sanjay Gupta in YouTube. You can also download my android app Takamis which is available on Play Store. Thank you for watching this video.