文件的读写API函数

#include "stdio.h"
#include "stdlib.h"
#include "string.h"

void main_fputc()
{
	FILE *fp = NULL;
	char s[] = "1234567890";
	int i = 0;
	char* filename = "c:/1.txt";

	fp = fopen(filename,"r+");
	
	if(fp == NULL)
	{
		printf("func fopen error!\n");
		return ;
	}

	printf("fopen success\n");

	for(i=0;i

你可能感兴趣的:(#,c/c++)