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. Design Odd-Even Transposition Algorithm? Algorithm: Odd-Even Transposition for I=1 to N { If (I%2 != 0) //i.e. Odd phase {
Explain the working of Dynamic RAM? A plain piece of hardware called a DRAM controller can be used to make DRAM behave more like SRAM and the job of the DRAM controller is to p
How does an enumstatement differ from a typedef statement? Typedef statement permits user to define an identifier that would show an exiting data type. The user-defined data
What is the use of fork and exec system calls? Fork is a system call by which a new process is formed. Exec is also a system call, which is used after a fork by one of the two
Biscuits move on a conveyer through an oven where they are cooked. Two sensors, H and C, measure the temperature of the oven, H = 1 if the oven is too hot and C = 1 if the ove
State the criteria which a trusted publisher should meet before adding him? Ans) The following criteria should be met by the publisher before adding him to the list. ? The
Q. Perform division in binary showing contents of accumulator, B register and Y register during each step. (Accumulator, B, Y are 5-bit registers) 13 / 2
Tool that is used to transfer data/files among computers on the Internet TCP (Transfer control protocol)
HCP
5-pin DIN connector: It is the connector of conventional keyboard which have 5 pins (2 IN, 2 OUT and one ground pin) used for transfer and synchronization.
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