 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can implement hashif, hashalif, hashelse, and hashendf directives for conditional compilation in C programming. Before starting, you can note how you can search my YouTube channel. You can type my name Sanjay Gupta in YouTube. My channel will be available there. You can watch various programming related videos here. Now I am going to implement all these pre-processor directives in front of you. First of all, I am going to include a header file that is a stdi.h. Now I am going to define a macro. So here identifier name is number and its replacement value is 10. Now I am going to define main function. Inside main function, first I am going to implement hashif. So hashif checks value of a macro with the value defined by the programmer. So I am writing this hashif number greater than 0. So number is a macro. Its current value is 10. So that 10 will be compared with 0. So if this condition is true, then you can write some set of instructions here. So I am printing number is positive. Now if you want to check another condition, so in place of elseif, you can use hashalif. So hashalif works for both else as well as if. So if the first condition which is available at line number 6 is false, then control will be transferred to line number 8 which is implementing else and if together. So here you can write another condition that is number less than 0. So here you can print another message. Number is negative. Now if both the conditions are false, it means number is 0. So for that you can implement only else that is hash else and here you can print number is 0. So this way I have implemented all the three cases using hashif, hashalif and hashelse. Now to close this hashif else block, I have to use hashendif. So this way I have implemented all four predefined, sorry all four pre-processor directives that are implemented for conditional compilation. So here value of this macro is 10. So after execution it will be displaying number is positive. So now I am going to execute this code so that you can see the output. Here you can see it is showing number is positive as output. It means it is working properly. Now suppose value is replacement value of macro number is 0. Again I am going to execute this code. You can see the output. It is showing number is 0. So this way it is working properly for both the cases. Now I am writing its replacement value as minus 5. So this time we have to check whether it is printing proper results or not. You can see it is showing correct results. That is number is negative. So in all three cases these pre-processor directives are working properly. So this way if you want to implement more than one conditions using pre-processor directives then you can prefer hashalif along with hashif and if you want to provide last alternate then you can prefer hashelse and for termination you can use hashandif. So I hope you have understood the use of all four pre-processor directives that is hashif, hashalif, hashelse, hashandif. So this is all about this topic in this video. If you want to watch more programming related videos you can search my name Sanjay Gupta on YouTube. My channel will be available there. You can also download my programming app Takimiz which is available on Google Play. Thank you for watching this video.