I have an input argument string const char* s I know that it starts the sequence of chars which are integers representation ,this sequence could be of any length ,
const char* s
You can iterate through the string and can give the condition to get numbers
num=0; for(i=0;str[i]!='\0';i++) { if(str[i]>=48 && str[i]<=57) num=num*10+(str[i]-48); printf("\n%d",num); }