2017-08-02 scanf #include <stdio.h> int main(void) { char *text = "123,456\n"; int no; char buf[]="bbbbbbbbbbbbbbb"; sscanf(text,"%d,%s", &no, buf); printf("'%d','%s'\n", no, buf); // '123','456' return 0; }