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 the difference between malloc() and calloc() function in c language?
What is difference between arrays and pointers?
What is new line escape sequence?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
Can a file other than a .h file be included with #include?
what are the facialities provided by you after the selection of the student.
Why is void main used?
Ow can I insert or delete a line (or record) in the middle of a file?
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
Explain why c is faster than c++?
Give me the code of in-order recursive and non-recursive.
how to construct a simulator keeping the logical boolean gates in c
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
If the size of int data type is two bytes, what is the range of signed int data type?