I have problem with "tab" output. My program is going to show part sums. 
I want to save those part sums in tab array but it shows only first sum.

here is code I wrote:

```
const char numbers[] = { "1 2 3 4" };
cout << numbers << endl;
for (int i = 0; i < strlen(numbers); ++i)
{
    if (numbers[i] != ' ') cout << numbers[i] << endl;  
}
int sum = 0;
char tab[20];
for (int i = 0; i < strlen(numbers); ++i){
    if (numbers[i] != ' ') {
        sum += atoi(&numbers[i]);
        _itoa_s(sum,&tab[i],sizeof(tab),10);
    }
}
cout << tab;
_getch();
return 0;

```

How I can make it to show proper part sums like: 1 3 6 10