fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main()
  5. {
  6. char tmp[] = " .. 1 . 0.1 ";
  7. char * first = strtok(tmp, ".");
  8. char * second = strtok(NULL, ".");
  9. char * third = strtok(NULL, ".");
  10. printf("[%s][%s][%s][%s]", tmp, first, second, third);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
[ ][ ][  1 ][ 0]