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


Please Help Members By Posting Answers For Below Questions

Where is volatile variable stored?

637


Why does the call char scanf work?

607


Compare array data type to pointer data type

592


What does emoji p mean?

589


please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics

2851






Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

570


Why is C language being considered a middle level language?

642


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

554


Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.

1578


How many main () function we can have in a project?

602


Explain how can a program be made to print the name of a source file where an error occurs?

673


How can I manipulate individual bits?

596


How many types of errors are there in c language? Explain

560


What are the different types of pointers used in c language?

606


WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER

1453