fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. char arquivo[] = "1 2 3 4 5";
  5. int a, b, c, d, e;
  6. sscanf (arquivo, "%d %d %d %d %d", &a, &b, &c, &d, &e);
  7. printf ("%d - %d - %d - %d - %d", a, b, c, d, e);
  8. return 0;
  9. }
Success #stdin #stdout 0s 2156KB
stdin
1
2
3
4
5
stdout
1 - 2 - 3 - 4 - 5