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
Explain how do I determine whether a character is numeric, alphabetic, and so on?
How can I generate floating-point random numbers?
What are the 5 organizational structures?
How can type-insensitive macros be created?
When should you use a type cast?
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
How many types of operators are there in c?
Does c have class?
Why dont c comments nest?
What is the meaning of typedef struct in c?
What is #line in c?
Is exit(status) truly equivalent to returning the same status from main?
What are run-time errors?
What’s a signal? Explain what do I use signals for?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.