what will be the position of the file marker?

a: fseek(ptr,0,SEEK_SET);

b: fseek(ptr,0,SEEK_CUR);

Answers were Sorted based on User's Feedback



what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_..

Answer / susie

Answer :

a: The SEEK_SET sets the file position marker to the
starting of the file.

b: The SEEK_CUR sets the file position marker to the
current position

of the file.

Is This Answer Correct ?    25 Yes 1 No

what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_..

Answer / karthikeyan g

a:
it is used to set the pointer from the starting position.
ex: fseek(ptr,10,SEEK_SET);
here,the pointer going to point the 10th position from starting position.

b:
it is used to set pointer position from the current position.
ex: fseek(ptr,10,SEEK_CUR);
here,the pointer going to point the 10 th position from the current position

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More C Code Interview Questions

What are segment and offset addresses?

2 Answers   Infosys,


create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00

0 Answers   Microsoft,


What are the files which are automatically opened when a C file is executed?

1 Answers  


#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?

1 Answers   Wipro,


main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }

1 Answers  






main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }

1 Answers  


union u { union u { int i; int j; }a[10]; int b[10]; }u; main() { printf("\n%d", sizeof(u)); printf(" %d", sizeof(u.a)); // printf("%d", sizeof(u.a[4].i)); } a. 4, 4, 4 b. 40, 4, 4 c. 1, 100, 1 d. 40 400 4

3 Answers   HCL,


main() { int x=5; clrscr(); for(;x<= 0;x--) { printf("x=%d ", x--); } } a. 5, 3, 1 b. 5, 2, 1, c. 5, 3, 1, -1, 3 d. –3, -1, 1, 3, 5

2 Answers   HCL,


void main() { int i=5; printf("%d",i++ + ++i); }

3 Answers  


main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); } int i;

1 Answers  


There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.

1 Answers   TCS,


How do you write a program which produces its own source code as its output?

7 Answers  


Categories