Assume you have a character array like this.
char identity[10] = {'9','8','2','7','3','1','8','3','6','v'};
I want to grab the first two digits (in this case 9 and 8) from the character array and assign that whole value (in this case it's 98) into an integer variable.
In this case I want to put value 98 into an int variable.
If my array content is {'4','6','2','3','5','6','4','2','8','v'}
then I want to set 46 as my int variable value.
How can I do this in c?