How can we open a file in Binary mode and Text mode?what is
the difference?
Answer / 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 |
How do you do dynamic memory allocation in C applications?
find a number whether it is even or odd without using any control structures and relational operators?
22 Answers Microsoft, Shashank Private Limited,
Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80
Explain why c is faster than c++?
WAP to accept basic salary of an employee? Calculate it HRA=25%,DA=30%,PF=30%&net salary display all contents?
6 Answers Finite Infotech, Lovely Professional University, Wipro,
What is the use of pragma in embedded c?
write a program to display the numbers in the following 4 4 3 3 2 2 1 1 0 1 1 2 2 3 3 4 4
What does emoji p mean?
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
What is your stream meaning?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }