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.
how does a ohms law c++ programming works
Determine the term Queries-DBMS Queries most commonly allow information to be retrieved from tables. As the information is often spread across numerous tables, queries allow it
Name the various Display devices Different types of display devices are discussed along with the principles on which these work. The main display devices used with CAD systems
Explain inter process communication
What are the advantages of code optimization? Code optimization tends at enhancing the execution efficiency of a program. It is achieved in two manners. Redundancies in a progr
What are SIMM and DIMM? SIMM are Single In-Line Memory Module. DIMM is Dual In-Line Memory Modules. Such modules are an assembly of various memory chips on a separate small boa
What is 1 00 line exchange with one two-motion selector per subscriber. Design: In, Strowger switching system is designed by using one two-motion selector for all subscrib
Q. Explain about System Deadlock? A deadlock denotes to the condition when simultaneous processes are holding resources and putting off each other from finishing their executio
How many 128 × 8 RAM chips are required to provide a memory capacity of 2048 bytes. Ans. Available here RAM chips = 128 x 8 Required the memory capacity = 2048 x 8 No. of chip
The decimal equivalent of Binary number 10101 is ? Ans. 1x2 4 + 0x2 3 +1x2 2 +0x2 1 + 1x2 0 = 16 + 0 + 4 + 0 + 1 = 21.
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