For example:
void thisIsAnExample(Hello* bye, char* name, int num, in* arr, int* sum){
GoodBye x;;
x.funName = name;
.
.
.
Two semicolons can also occur in for loops: for(;;) { ... } In this case, all three 'slots' are empty, nothing is initialized, or incremented, and there's no condition for when the loop should run. This is a way to write an eternal loop that can only be left from inside the block with a break statement.
Rules for Using SemicolonsUse a semicolon between two independent clauses that are connected by conjunctive adverbs or transitional phrases.
Semicolons are end statements in C. The Semicolon tells that the current statement has been terminated and other statements following are new statements. Usage of Semicolon in C will remove ambiguity and confusion while looking at the code.
The for loop has 3 components, separated by semi-colons. The first component runs before the looping starts and is commonly used to initialize a variable. The second is a condition. The condition is checked at the beginning of each iteration, and if it evaluates to true, then the code in the loop runs.
It has the meaning of an a statement followed by an empty statement.
In C each statememnt ends with ;
. So a statement with a ;
followed by one, is a statement followed by an empty statement.
It doesn't mean anything. It's just an extra semicolon. You can delete it (leaving a single semicolon) without any effect on your program.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With