Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Aug 8, 2012, 7:00 AM EDT
#include
Can you explain what's not working for you?
Deepak VermaRank #672 · 3.6K reputationPosted Aug 7, 2012, 9:00 PM EDT
Plz refer to this link : http://www.mycplus.com/tutorials/c-programming-tutorials/file-handling/
Nattudurai EswaramurthyRank #5,536 · 296 reputationPosted Aug 7, 2012, 10:53 PM EDT
Hi, Here i am sharing some peace of code. hope this will helpful to u. #include #include main( ) { FILE *fp; char stuff[25]; int index; fp = fopen("TENLINES.TXT","w"); /* open for writing */ strcpy(stuff,"This is an example line."); for (index = 1; index #include int main() { FILE *fp; file = fopen("file.txt","w"); /*Create a file and add text*/ fprintf(fp,"%s","This is just an example :)"); /*writes data to the file*/ fclose(fp); /*done!*/ return 0; }sami sam39 reputationPosted Aug 8, 2012, 5:36 AM EDT
sami sam39 reputationPosted Aug 20, 2012, 1:58 AM EDT