string to integer OR float

I was wondering if its possible to get the integer OR float value of a string. If I know it's an integer I can do int x = atoi(str) and atof if its a float but what do I do if I don't know what it is (in other words if I don't know if it's a float or an integer)?

Basically I have a string with two numbers (and a space between them) and I want to get the numbers, add them and print the result. (I know how to split the string)

Hi. so this is actually a continuation from another question of mine[Here](https://www.daniweb.com/programming/software-development/threads/506795/dynamically-add-values-into-datagridview-cell-from-listbox-vb2010) but i was advised to start a new thread as the original question …

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 ...

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 ...