in reply to Re^3: If I was forced to use only one kind of loop for the rest of my days it would be a
in thread If I was forced to use only one kind of loop for the rest of my days it would be a

In fact, I belive

for(int a = 0; a<10; a++) { printf("%d\n",a); }
is equivalent to
{ int a = 0; while(a<10) { printf("%d\n",a); a++; }
Your other code,
{ int a = 0; while(a++,a<10) { printf("%d\n",a); } }
doesn't run the printf statement with a = 0.
  • Comment on Re^4: If I was forced to use only one kind of loop for the rest of my days it would be a
  • Select or Download Code