What are the functions to open and close file in c language?



What are the functions to open and close file in c language?..

Answer / Ram Narayan Prajapati

"FILE *fp = fopen("filename", "r"); // opens a file in read mode.n fclose(fp); // closes the file. "

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What is volatile

2 Answers  


progrem to generate the following series 1 12 123 1234 12345

6 Answers   HCL, Wipro,


Are the expressions * ptr ++ and ++ * ptr same?

1 Answers  


What is the difference between fork() and vfork()?

2 Answers  


What does extern mean in a function declaration?

4 Answers  


extern static int i func() { i =10; i++; printf("%d \n",i); } main() { i =20; printf("%d \n",i); func(); printf("%d \n",i); }

2 Answers  


In a switch statement, what will happen if a break statement is omitted?

1 Answers  


What is const and volatile in c?

1 Answers  


What is type qualifiers?

1 Answers  


write a program for size of a data type without using sizeof() operator?

22 Answers   HCL, IBM,


What is merge sort in c?

1 Answers  


Explain null pointer.

1 Answers  


Categories