नमस्कार / నమస్కారము / competitions for 9th class to PG level students. Plz avail the opportunity https://drive.google.com/file/d/1RBtU515A3WkO5TRR-qXCWTNeAYonCeHE/view?usp=drivesdk ధన్యవాదములు/ நன்றி/
100% C prog to write content into a file and then read it back onto the console
#include<stdio.h> #include<conio.h> void main() { char ch; FILE *fptr; // clrscr(); fptr=fopen("kotta1601.txt","w"); printf("\n start entering the data: \n "); ch=getchar(); while(ch!='z') { fputc(ch,fptr); ch=getchar(); } fclose(fptr); //writing file is completed now lets start reading from the just created file fptr=fopen("kotta1601.txt","r"); printf("\n start reading the data from the file: \n "); while(!feof(fptr)) { ch=fgetc(fptr); putchar(ch); } fclose(fptr); getch(); }
కామెంట్లు
కామెంట్ను పోస్ట్ చేయండి
దయచేసి మీ సలహాలను సూచనలను స్పష్టంగా పేర్కొనగలరు. plz see that ur comments are 'acceptable' in a value based society.