C While Loop Program to show Difference Between Pre-Increment and Post-Increment

C While Loop Program to show Difference Between Pre-Increment  and Post-Increment 



#include

 int main(void) {
  int i;
 
  i = 0;
  while(i++ < 5) {
   printf("%d\n", i);
  }
  printf("\n");
  i = 0;
  while(++i < 5) {
   printf("%d\n", i);
  }
  return 0;
 }



No comments:

Post a Comment