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





Write Comment

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

Comments

  • By: guest on 01 Jun 2017 12.02 pm
    The file source.txt will be opened in the binary mode.
Tags
Show Similar Question And Answers
QA->The extension jpeg in the name of a file indicates that it is a/an file.....
QA->Which general purpose high level programming language was created by Guido van Rossum in the Netherlands?....
QA->Which scheme aims at the "urban slum dwellers living below the poverty line who do I not possess adequate shelter?....
QA->ഒരു file ന്റെ size നെ കുറയ്ക്കുവാൻ ഉപയോഗിക്കുന്ന രീതി ? ....
QA->FTP (File:Transfer Protocol) എന്നാൽ എന്ത് ? ....
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
DMCA.com Protection Status Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions