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.
Q. What is Dot Pitch of a CRT? Dot Pitch of a CRT is the distance between phosphor dots of same colour. In Trinitron screens, the term Slot Pitch is used in place of Dot Pitch
What is the purpose of putchar function Putchar writes one character to the standard output file, stdout. Syntax #include int putchar(int c); The putchar macro wr
What are the server specific middle wares? Server specific middle wares. Their role in e-commerce. Additional features needed by e-commerce server. Middleware is the term of
Explain the principles of operation of centralized SPC and distributed SPC and compare their performance. All the control equipment is replaced with a single processor that mus
What are the basic features of Supply Chain Management? Features of Supply Chain Management Supply Chain Management uses different methods to find out, affect and chang
Classify computer systems according to capacity. How they are different from computers according to the classification of technology. Provide comparative study also.
Signify this problem by means of: i. An Entity Relationship model; ii. Relational tables. Pete's Programmers is a firm which supplies part time staff on contract to organisat
Explain the term- Wireless Technologyand Broadband Wireless Technology (WiFi) and Broadband Most areas in the world now provide broadband instead of dial up for connectin
Binning process is very helpful to save space. Performance may differ depending upon the query generated sometimes solution to a query can come within some seconds and sometimes it
What are the Advantages of carrying out simulations - saves cost (instead of doing the real thing) - Safer (scenarios tried out on the simulation first before used in real
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