0 votes
112 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 205 views
+1 vote
1 answer 128 views
0 votes
1 answer 213 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

561 users

...