Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Creating Files for Writing Only
Creating Files for Writing Only : To create a text file for writing only, pass "w" into fopen as the second argument. This example follows along the same lines as the previous:
#include
int main()
{
FILE *file; /* declare a FILE pointer */
file = fopen("data/writing.dat", "w");
/* create a text file for writing */
if(file==NULL)
}
else
printf("Error: can't create file.\n");
/* fclose(file); DON'T PASS A NULL POINTER TO fclose !! */
return 1;
printf("File created. Now closing it...\n");
fclose(file);
return 0;
Now, if I went into my data folder, I could see a text file called "writing" was created. However, if my data folder didn't exist, an error would occur.
I need help on my assignments that i need to submit in 10 days. There are total 3-4 assignments on two different subjects: 1) 2-3 assignments in Operating Systems and 2) 1-2 assign
With reference to telephone traffic, explain the terms GOS. GOS: in loss systems, the traffic carried through the network is usually lower than the actual traffic offered to
What is the advantage of using interrupt initiated data transfer over transfer under program control without interrupt? In the interrupt initiated data transfer, the processor
Q. How to define a Filename in DOS? Each file is given a name so that it can be referred to later. This name is termed as Filename. The filename in DOS can be up to eight alpha
Explain the significance of init() and destroy( ) methods of an applet? Also explain two ways of invoking an applet. The init( ) method is utilized for fundamental initializati
what is Ambiguity in single inheritance
State the scope of security policy The scope of security policy depends on aspects such as the size of the Intranet site, type of information hosted on it, and the number of u
Drawbacks of linear arrays
what is area subdivision and working
Show how finite state machine model helps in designing a switching system and give a typical example. Switching system fundamentally belongs to the class of finite state machi
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd