Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is the role of && operator in a program code?

1066


Why static is used in c?

1089


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

1936


what are bit fields in c?

1703


What are formal parameters?

1112


What is meant by operator precedence?

1142


When should a type cast be used?

1010


What are c preprocessors?

1185


how many key words availabel in c a) 28 b) 31 c) 32

1076


Which is better malloc or calloc?

1097


What is 1f in c?

2647


What is signed and unsigned?

1056


how to write a c program to print list of fruits in alpabetical order?

2293


What is the right type to use for boolean values in c? Is there a standard type?

1007


Explain what is the difference between #include and #include 'file' ?

1020