Is it necessary to put statements after "if" in curly braces? In cpp | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is it necessary to put statements after "if" in curly braces? In cpp

17th Sep 2017, 5:35 AM
ADVAIT P CHAND
ADVAIT P CHAND - avatar
1 Answer
+ 16
agreed with @ Luka for e.g. In Cpp you don't need to put curly brasis for one statement. but needs to put on a block of two or more statements.
17th Sep 2017, 5:42 AM
P R
P R - avatar