<p>I have a string (char) and I want to extract numbers out of it.</p>

<p>So I have string: <code>1 2 3 4 /0</code><br>
And now I want some variables, so I can use them as integer: <code>a=1, a=2, a=3, a=4</code></p>

<p>How can I do that?</p>

sscanf() can do that.
```
```
#include <stdio.h>

int main(void)
{
  int a, b, c, d;
  sscanf("1 2 3 4", "%d %d %d %d", &a, &b, &c, &d);
  printf("%d,%d,%d,%d\n", a, b, c, d);
}
```
```