You are on page 1of 1

#include <stdio.

h>
#include <stdlib.h>

int main(){
char str[30] = "1231 mardan";
char *ptr;
long ret;

ret = strtol(str, &ptr, 10);


printf("The number is %ld \n", ret);
printf("String part is %s abc", ptr);
}

You might also like