You should go trough the chararray (string) with a loop and everytime when you encounter a "space" convert the previous chars to int and store them in an int-array. Something like this perhaps:
char Buffer; //max 10 digits
int i = 0;
int k = 0;
for (iCount = 0; mytext[iCount] != '\0'; iCount++)
if (mytext[iCount] != ' ')
Buffer[i] = mytext[iCount];
Buffer[i] = '\0';
Ouput[k] = atoi(Buffer);
i = 0;
I haven't tested this because my compiler won't start... But what I'm trying to do is: Go trough the string with a loop until I encouter the 'end of string char ( \0 ). Store the value of the element in a buffer unless it's a space. If it's a space, terminate the string, convert the buffer to an int and store it in an int-array (output). Then update all counters and continue.
I hope you get the basic idea. There are probably more direct ways to solve your problem, but I'm not yet back to my logic self...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...