How to convert a string of ints Eg 45 34 21 22 into int's and store them in an array ? in C programm
- by Srinivasa Varadan
Hi ,
I have a string val = "14 22 33 48";
int matrix[5];
I need to insert each of the values in the string into the respective location in the array
Eg: matrix[0] = 14;
matrix[1] = 22;
matrix[2] = 33;
matrix[3] = 48;
How do I do this ?