Answers for "read in c"

C
13

read files in c

#include<stdio.h>
int main(){
	FILE *in=fopen("name_of_file.txt","r");
	char c;
	while((c=fgetc(in))!=EOF)
		putchar(c);
	fclose(in);
	return 0;
}
Posted by: Guest on April-30-2020
2

read files in c

#include <stdio.h>

main() {
   FILE *fp;

   fp = fopen("/tmp/test.txt", "w+");
   fprintf(fp, "This is testing for fprintf...n");
   fputs("This is testing for fputs...n", fp);
   fclose(fp);
}
#https://moneyconvert.net/
Posted by: Guest on October-28-2021

Code answers related to "C"

Browse Popular Code Answers by Language