Question Set

1. What is the purpose of "rb" in fopen() function used below in the code? FILE fp; fp = fopen("source.txt", "rb");





Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

  • By: guest on 01 Jun 2017 06.02 pm
    The file source.txt will be opened in the binary mode.
Show Similar Question And Answers
QA->If function inside another function is called a _____ Function....
QA->The extension jpeg in the name of a file indicates that it is a/an file.....
QA->In a secret way of writing COME AT ONCE FATHER VERY ILL is written as XLNV ZG LMXY UYGSVI EVIB ROO.Bearing this in mind pick up the code from the answer choices for the word given below: FIT AND WELL....
QA->In a certain code SUNDAY is coded as USDNYA. How could CREATION be written in that code?....
QA->.In certain code STUDENT is written as UVWFGPV,how would TEACHER be written in the same code?....
MCQ->On executing the below program what will be the contents of 'target.txt' file if the source file contains a line "To err is human"? #include<stdio.h> int main() { int i, fss; char ch, source[20] = "source.txt", target[20]="target.txt", t; FILE fs, ft; fs = fopen(source, "r"); ft = fopen(target, "w"); while(1) { ch=getc(fs); if(ch==EOF) break; else { fseek(fs, 4L, SEEK_CUR); fputc(ch, ft); } } return 0; }....
MCQ->What is the purpose of "rb" in fopen() function used below in the code? FILE fp; fp = fopen("source.txt", "rb");....
MCQ->If the file 'source.txt' contains a line "Be my friend" which of the following will be the output of below program? #include<stdio.h> int main() { FILE fs, ft; char c[10]; fs = fopen("source.txt", "r"); c[0] = getc(fs); fseek(fs, 0, SEEK_END); fseek(fs, -3L, SEEK_CUR); fgets(c, 5, fs); puts(c); return 0; }....
MCQ->What will be the content of 'file.c' after executing the following program? #include<stdio.h> int main() { FILE fp1, fp2; fp1=fopen("file.c", "w"); fp2=fopen("file.c", "w"); fputc('A', fp1); fputc('B', fp2); fclose(fp1); fclose(fp2); return 0; }....
MCQ->Point out the error in the program? #include<stdio.h> / Assume there is a file called 'file.c' in c:\tc directory. / int main() { FILE fp; fp=fopen("c:\tc\file.c", "r"); if(!fp) printf("Unable to open file."); fclose(fp); return 0; }....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution