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
Explain the use of bit fieild.
What are the standard predefined macros?
Tell me about low level programming languages.
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
What is hash table in c?
How many levels deep can include files be nested?
What is wrong with this program statement? void = 10;
Explain enumerated types.
Hi can anyone tell what is a start up code?
Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58
What are the three constants used in c?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
State the difference between x3 and x[3].
Multiply an Integer Number by 2 Without Using Multiplication Operator
If null and 0 are equivalent as null pointer constants, which should I use?