fork download
  1. #include <stdio.h>
  2. int main(void) {
  3. // your code goes here
  4. int x; /* loop variable */
  5.  
  6. for (x = 0; x < 5; x++) { }
  7. printf ("\nThe final value of x is %i: ", x); /* will print 5 */
  8.  
  9. for (x = 0; x <= 5; x++)
  10. {
  11. /* do nothing */
  12. }
  13. printf ("\nThe final value of x is %i: ", x); /* will print 5 */
  14.  
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
The final value of x is 5: 
The final value of x is 6: