Why we use curly brackets {....} In many programming languages like C/C++ ... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why we use curly brackets {....} In many programming languages like C/C++ ...

Between main program and sub program

30th Dec 2018, 8:40 AM
Gyanendra Gupta
Gyanendra Gupta - avatar
1 Answer
+ 5
This is the language standard, some languages use them some don't. C uses them to enclose a group of statements. Take a look : https://www.computerhope.com/jargon/c/curlybra.htm In certain cases, they can be omitted : https://stackoverflow.com/questions/14901919/when-can-i-omit-curly-braces-in-c/47531901
30th Dec 2018, 9:02 AM
dρlυѕρlυѕ
dρlυѕρlυѕ - avatar