Program to write some contents into a file using file
operations with proper error messages.
Answer Posted / manvitha
//writing into a file
main()
{
char c;
FILE *fp;
fp=fopen("infor.dat",'w');
printf("enter data \n enter tab & enter a stop\n");
do
{
c=getchar();
put c(c,fp);
}while(c!='\t');
fclose(fp);
getch();
}
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
How can variables be characterized?
What standard functions are available to manipulate strings?
What is the use of parallelize in spark?
What are the 4 types of programming language?
What is time null in c?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
What is type qualifiers?
What oops means?
What is a const pointer in c?
any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above
How do we declare variables in c?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
Explain can you assign a different address to an array tag?
what are the advantages of a macro over a function?
Is main is a keyword in c?