C Programming - Control Instructions - Discussion
Discussion Forum : Control Instructions - Point Out Correct Statements (Q.No. 7)
7.
Which of the following sentences are correct about a for loop in a C program?
1: | for loop works faster than a while loop. |
2: | All things that can be done using a for loop can also be done using a while loop. |
3: | for(;;); implements an infinite loop. |
4: | for loop can be used if we want statements in a loop get executed at least once. |
Discussion:
48 comments Page 5 of 5.
Pradnya solke said:
1 decade ago
Only do...while loop can be used to execute statement atleast once.
Khush said:
1 decade ago
@Ranganath : its mentioned tht "for loop CAN be used..."
Sai lakshmi said:
9 years ago
How for loop is used to execute statements atleast once?
Akshay Kalra said:
1 decade ago
Can anyone tell me how while is faster than for loop?
Afsha said:
5 years ago
How option 4 is right?
Can anyone explain it?
Can anyone explain it?
(4)
Ranganath M said:
1 decade ago
For 4th statement do_while loop only correct.
Akash said:
1 decade ago
How is for loop slower than while loop?
Deepa said:
1 decade ago
Why statement 4 is true ?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers