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 |
What is a struct c#?
What is the process of writing the null pointer?
Can you define which header file to include at compile time?
#define DCHAR char* typedef char* TCHAR; if using these following variables will be declared like DCHAR ch1, ch2; TCHAR ch3, ch4; then what will be types of ch1, ch2, ch3 and ch4?
WAP to accept first name,middle name & last name of a student display its initials?
write a c program to change only the 3rd bit of the particular number such that other bits are not affected.. if bitnum=10(say.. it can be any no..
Explain the term printf() and scanf() used in c language?
what is the role you expect in software industry?
for(;;) printf("C language") What is out put of above??
2 Answers Practical Viva Questions,
Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +
15.what is the disadvantage of using macros? 16.what is the self-referential structure? 17.can a union be self-referenced? 18.What is a pointer? 19.What is the Lvalue and Rvalue? 20.what is the difference between these initializations? 21.Char a[]=”string”; 22.Char *p=”literal”; 23.Does *p++ increment p, or what it points to?
The variables are int sum=10,SuM=20; these are same or different?