开发者

how to write two strings in a file seperated by space or comma in c?

开发者 https://www.devze.com 2023-02-07 04:11 出处:网络
I am having two strings , I want to write these strings to a FILE in the following format: string1 \"space开发者_如何学Go/comma\" string2 \"newline\"

I am having two strings , I want to write these strings to a FILE in the following format:

string1 "space开发者_如何学Go/comma" string2 "newline"
string3 "space/comma" string4 "newline"
..
..
..


FILE* fileptr = fopen("file.txt","wt");
fprintf(fileptr,"%s , %s \n",string1,string2);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号