+1 vote
92 views
in C program by (3.4k points)
edited

Can we use single statement in loop body without using curly braces "{...}"?

1 Answer

0 votes
by (3.4k points)
selected by
 
Best answer

Yes, when loop body has single statement, than we can escape curly braces "{...}".

Consider the example:

Yes, when loop body has single statement, than we can escape curly braces "{...}".

Consider the example:

1

2

         for(i=1;i<=10;i++)

        printf("\n%d ",i);

Related questions

+1 vote
1 answer 105 views
0 votes
1 answer 78 views
0 votes
1 answer 90 views
0 votes
1 answer 126 views
+1 vote
1 answer 102 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

531 users

...