How can we open a file in Binary mode and Text mode?what is
the difference?
Answer Posted / sha
fopen("file1.txt","wb"); will open the file file1.txt in
binary read and write mode. Binary mode is useful to write
a file with 0s and 1s. For example, sometimes it would be
required to open a executable file. In that case, binary
mode is useful.
fopen("file1.txt","w"); will open the file1.txt in text
mode which means you can write regular letters and numbers
in that file.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is a stream water?
What is meant by initialization and how we initialize a variable?
In which language linux is written?
explain what is a newline escape sequence?
What is difference between array and structure in c?
Why we not create function inside function.
What is the meaning of c in c language?
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
How many identifiers are there in c?
What is #line?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
Is c easier than java?
Explain what is operator promotion?
How would you obtain the current time and difference between two times?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?