fork download
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3.  
  4. int main() {
  5. char x[3];
  6. x[0] = '1';
  7. x[1] = '2';
  8. x[2] = '\0';
  9. int x_int = atoi(x);
  10. printf("%i", x_int);
  11. return 0;
  12. }
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
12