摘要:
获取最后n行数据 把每个数组看成是1行 #include <stdio.h> int main(void) { // 示例数据 成员大小最多20字节 成员数量最多5个 char s1[5][20] = {"a1", "a2", "a3", "a4", "a5"}; char s2[5][20] = 阅读全文
posted @ 2023-11-07 13:04
C羽言
阅读(175)
评论(0)
推荐(0)
摘要:
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_LINE_SIZE 1024 int main() { // 打开要读取的CSV文件 FILE *csvFile = fopen("data.csv", "r 阅读全文
posted @ 2023-11-07 10:33
C羽言
阅读(738)
评论(0)
推荐(0)
摘要:
#include <stdio.h> int main() { // 打开要写入的CSV文件 FILE *csvFile = fopen("data.csv", "w"); if (csvFile == NULL) { perror("Failed to open file"); return 1; 阅读全文
posted @ 2023-11-07 10:10
C羽言
阅读(383)
评论(0)
推荐(0)