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 |
#include<stdio.h> #include<conio.h> void main() { float a; clrscr(); a=0.5; if(a==0.5) printf("yes"); else printf("no"); getch(); }
write a program to copy a string without using a string?
Design a program using an array that lists even numbers and odd numbers separately from the 12 numbers supplied by a user.
what's the o/p int main(int n, char *argv[]) { char *s= *++argv; puts(s); exit(0); }
To what value do nonglobal variables default? 1) auto 2) register 3) static
Binary tree traversing
main() { int a[3][4] ={1,2,3,4,5,6,7,8,9,10,11,12} ; int i, j , k=99 ; for(i=0;i<3;i++) for(j=0;j<4;j++) if(a[i][j] < k) k = a[i][j]; printf("%d", k); }
4 Answers Vector, Wipro, Zoho,
What is static and volatile in c?
What is wrong with this program statement?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
What are the salient features of c languages?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.