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
What is assignment operator?
what is reason of your company position's in india no. 1.
Explain the use of keyword 'register' with respect to variables.
What is use of bit field?
Write a program for Overriding.
Why doesnt that code work?
Differentiate between null and void pointers.
What are local variables c?
main() { printf("hello"); fork(); }
Explain how do you determine whether to use a stream function or a low-level function?
How is a structure member accessed?
What is masking?
What is the use of a static variable in c?
What are c header files?
What are header files and explain what are its uses in c programming?