parth2911
0
Newbie Poster
Recommended Answers
Jump to Postfreopen() OR fopen(). try to read about them, you will find them useful. thanks.
Jump to PostUse fopen
Jump to PostIn order to know if it worked or not you have to test the return value of fopen()
#include<stdio.h> int main() { FILE *fp; fp=fopen("c:\\1.txt","r+"); if( fp == NULL) printf("file not found\n"); else printf("Success!\n"); fclose(fp); return 0; }
All 9 Replies
nitin1
15
Master Poster
Banfa
597
Posting Pro
Featured Poster
parth2911
0
Newbie Poster
Banfa
597
Posting Pro
Featured Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
parth2911
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
parth2911
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.