Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 C 程序生成这些数据。我需要将其放入 CSV 文件中,以便其他程序可以使用它。我怎样才能做到这一点?
Student1 Mark1 Mark2 Mark3 Mark4 Mark5 Student2 Mark1 Mark2 Mark3 Mark4 Mark5 Student3 Mark1 Mark2 Mark3 Mark4 Mark5 Student4 Mark1 Mark2 Mark3 Mark4 Mark5 Student5 Mark1 Mark2 Mark3 Mark4 Mark5
你可以通过fprintf
fprintf
for(i = 0; i < num_of_students; i++) fprintf(fptr, "%s,%d,%d,%d,%d,%d\n", name, mark1, mark2, mark3, mark4, mark5);