Question Set

1. Point out the error in the program? #include<stdio.h> int main() { FILE fp; fp=fopen("trial", "r"); fseek(fp, "20", SEEK_SET); fclose(fp); return 0; }





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.01 pm
    Instead of "20" use 20L since fseek() need a long offset value.
Show Similar Question And Answers
QA->Rahim travelled straight from point E to F at a distance of 5 km. From F he turned left and travelled 6 km and reached point G, there he took a left turn and travelled 5 km to reach point H. He took another left turn and travelled 2 km and reached point I. How far is he from the starting point ?....
QA->The extension jpeg in the name of a file indicates that it is a/an file.....
QA->A word is given in capital letters. It is followed by four words. Out of these four words, three cannot be formed from the letters of the word in capital letters. Point out the word which can be formed from the letters of the given word in capital letters— ARCHITECTURE....
QA->Name the translatory program which translates the high level language into machine language before running the program?....
QA->An unauthorized program which functions from inside what seems to be an authorized program, thereby concealing what it is actually doing:....
MCQ->Point out the error in the program? #include<stdio.h> int main() { FILE fp; fp=fopen("trial", "r"); fseek(fp, "20", SEEK_SET); fclose(fp); return 0; }....
MCQ->What will be the output of the program? #include<stdio.h> int fun(int, int); typedef int (pf) (int, int); int proc(pf, int, int); int main() { printf("%d\n", proc(fun, 6, 6)); return 0; } int fun(int a, int b) { return (a==b); } int proc(pf p, int a, int b) { return ((p)(a, b)); }....
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->Which files will get closed through the fclose() in the following program? #include<stdio.h> int main() { FILE fs, ft, fp; fp = fopen("A.C", "r"); fs = fopen("B.C", "r"); ft = fopen("C.C", "r"); fclose(fp, fs, ft); return 0; }....
MCQ->Which of the following statement is correct about the program given below? #include<iostream.h> int BixTest(int x, int y); int BixTest(int x, int y, int z = 5); int main() { cout<< BixTest(2, 4) << endl; return 0; } int BixTest(int x, int y) { return x y; } int BixTest(int x, int y, int z = 5) { return x y z; }....
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