69,373
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int arr[50000];
FILE * fp = fopen("data.txt", "wb+");
int ret = fwrite(arr, sizeof(arr), 1, fp);
if (!ret)
printf("ERROR!\n");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int * arr;
arr = (int *)malloc(sizeof(int) * 50000);
FILE * fp = fopen("data.txt", "wb+");
int ret = fwrite(arr, sizeof(int)*50000, 1, fp);
if (!ret)
printf("ERROR!\n");
return 0;
}