If I have something like !23 How can I parse it to get just the number part?
Input: !23 Output: 23
Input: ! Output: Error
Input: !23eds3 Output: Error
This is my approach of getting the numeric digit. But for some reason strcpy is messing up my array where I am storing some data, its deleting the first element in my array.
if (args[0][0] == '!'){ 
  char str_index[1];
  strcpy(str_index, &args[0][1]);
  int index = atoi(str_index);
}
Also I haven't programmed in C a lot this is only my second program in C.
 
    