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
What is use of pointer?
What are the different file extensions involved when programming in C?
When would you use a pointer to a function?
How many keywords (reserve words) are in c?
Why does the call char scanf work?
What does static variable mean in c?
What is difference between structure and union in c programming?
How can I sort more data than will fit in memory?
What are directives in c?
How is a structure member accessed?
Who invented bcpl language?
How many types of operators are there in c?
Explain modulus operator.
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
please explain every phase in the "SDLC" in the dotnet.