0 votes
114 views
in C program by (98.9k points)
edited

Can the curly brackets { } be used to enclose a single line of code?

1 Answer

0 votes
by (98.9k points)
selected by
 
Best answer
While curly brackets are mainly used to group several lines of codes, it will still work without error if you used it for a single line. Some programmers prefer this method as a way of organizing codes to make it look clearer, especially in conditional statements.

Related questions

0 votes
1 answer 209 views
+1 vote
1 answer 130 views
0 votes
1 answer 217 views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

563 users

...