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 |
Why doesn't the code "a[i] = i++;" work?
Write a program to swap two numbers without using third variable in c?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
What is a global variable in c?
Explain how can I make sure that my program is the only one accessing a file?
Diff between for loop and while loop?
When should the volatile modifier be used?
How can you convert integers to binary or hexadecimal?
what is the difference between getch() and getchar()?
what will be the out put. #include<stdio.h> void main() { printf("Output:"); printf(1+"vikashpatel"); }//output: ikashpatel
what is printf
whats the use of header file in c?