0

Why doesn't the if statement have ;

22nd Sep 2020, 3:46 AM
Zach George Mathew
2 Réponses
+ 4
(as no language is mentioned so I am assuming it to be C/C++ ) Ans :- This is because semicolon is used to show the termination of one statement and while using *if-else* statment we generally execute a group of statements which are enclosed in braces"{ }" where "{" marks the beginning of the group and "}" marks the end. Same is in the case of loops also
22nd Sep 2020, 3:57 AM
Arsenic
Arsenic - avatar
+ 1
Thanks for your response. First time poster hence didn look to see if it would get posted in the same chapter. Your response makes sense.
22nd Sep 2020, 3:59 AM
Zach George Mathew