Answer Posted / naresh lingampally
In both the loops the Out put is same.... but the compile
structure is different:
i.e..,
syn: for(i=0;i<=10;i++)
{
statement;
}
while(i<=10)
{
statement;
i++;
} .
i=0; --> initialization.---{1)
i<=10;---> conditioning ---(2)
i++; ---> incrementation ---(3)
in (while) the compiler order would be
(1) .. not along with the loop
(2),(3) in the loop
but in (for) the order is (1),(2),(3) in a single statement.
NOTE: MAJOR DIFFERENCE IS WE CAN REDUCE THE LENGTH OF THE
PROGRAM (FOR) NAD IS MORE SOPHISTICATED.
Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
How can I avoid the abort, retry, fail messages?
What is double pointer?
What is a char c?
Write a program to swap two numbers without using the third variable?
What are the string functions? List some string functions available in c.
Is multithreading possible in c?
why do some people write if(0 == x) instead of if(x == 0)?
What is getch () for?
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
What is bubble sort in c?
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
What are the types of data files?
What is bin sh c?
Explain how do you print an address?
What is function prototype in c language?