Hey my name is Junaid shahid. In this post I will tell you about the c programming semicolons. Semicolon is most important sign for any programmer. You can execute any line of code without semicolon. Each line of code must have the semicolon at the end. So you can judge the power of semicolon. There is very common quote “single semicolon can disturb your whole life”. Which means if you missed one semicolon in your program your whole program is disturb.
Basically semicolon (;) is used at the end of each statement. Semicolon is used to tell the compiler that I am ending my statement on this point. Developers of all programming languages are designed semicolon as the end point. So that whenever you have to end your statements you will not use enter, you will use the semicolon “;”. There is another point, if you missed semicolon at the end of any statement you can’t execute the program. Until you don’t find where its missed and placed the semicolon.
Printf(“Value of A=%d”,&A);
This sample code is demonstrating how to use semicolon. At the end of every statement. One more thing we also used the semicolon at the end of do while loop. Loops are not statement they are functions. So we can say only one function which is end with semicolon. From now you must have to know semicolon is used to end all statements and do while loop also.
In this post I have tried my best to explain the importance of semicolon. Hope this is very helpful for you. If you found any ambiguity in this post please let me know. You can also join my Facebook group and met other programmers. Share your thoughts and views through the comments. I will appreciate your participation if you will share this piece of content.