2
0

atoi.c 337 B

12345678910111213
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include "test_helpers.h"
  4. int main(void) {
  5. printf("%d\n", atoi(" -42"));
  6. printf("%d\n", atoi(" +555"));
  7. printf("%d\n", atoi(" 1234567890 "));
  8. printf("%ld\n", atol(" -42"));
  9. printf("%ld\n", atol(" +555"));
  10. printf("%ld\n", atol(" 1234567890 "));
  11. }