fork download
  1. #include <stdio.h> /* printf, fgets */
  2. #include <stdlib.h> /* atoi */
  3.  
  4. int main ()
  5. {
  6. int x = atoi (" 123");
  7. int y = atoi ("123hello");
  8. int z = atoi ("hello");
  9. printf ("%d %d %d.\n",x,y,z);
  10. return 0;
  11. }
Success #stdin #stdout 0s 1832KB
stdin
Standard input is empty
stdout
123 123 0.