揮発性のメモ2

http://d.hatena.ne.jp/iww/

2017-08-02から1日間の記事一覧

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; }</stdio.h>