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
writ a program to compare using strcmp VIVA and viva with its output.
What does %d do?
What is restrict keyword in c?
What is the use of pragma in embedded c?
Why is c so popular?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
What is variables in c?
What is c language used for?
Explain high-order and low-order bytes.
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
What is meant by operator precedence?
Where register variables are stored in c?
What is wrong in this statement?
any "C" function by default returns an a) int value b) float value c) char value d) a & b
What is printf () in c?