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 difference between far and near pointers?
What is the most efficient way to store flag values?
What is the full form of getch?
Why c is called procedure oriented language?
Can you apply link and association interchangeably?
What is the difference between strcpy() and memcpy() function in c programming?
What are the types of data types and explain?
what is the height of tree if leaf node is at level 3. please explain
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
What is #define?
What is the significance of an algorithm to C programming?
using for loop sum 2 number of any 4 digit number in c language
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
I need testPalindrome and removeSpace
#include
int far *near * p; means