fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. // Using pre-increment (++i)
  6. for (int i = 0; i < 10; ++i) {
  7. printf("%d ", i);
  8. }
  9.  
  10. // Using post-increment (i++)
  11. for (int i = 0; i < 10; i++) {
  12. printf("%d ", i);
  13. }
  14.  
  15.  
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0.01s 5288KB
stdin
45
stdout
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9