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

void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }

3 Answers  


main() { char a[4]="HELL"; printf("%s",a); }

3 Answers   Wipro,


main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

2 Answers  


main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }

6 Answers  


how to print 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 using any loop(for or while) only once(only 1 loop) and maximum 2 variables using C.

19 Answers   Cap Gemini, Infosys,






Write a program that reads a dynamic array of 40 integers and displays only even integers

2 Answers  


Finding a number which was log of base 2

1 Answers   NetApp,


hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?

6 Answers  


main() { char c=' ',x,convert(z); getc(c); if((c>='a') && (c<='z')) x=convert(c); printf("%c",x); } convert(z) { return z-32; }

1 Answers  


main() { static char names[5][20]={"pascal","ada","cobol","fortran","perl"}; int i; char *t; t=names[3]; names[3]=names[4]; names[4]=t; for (i=0;i<=4;i++) printf("%s",names[i]); }

2 Answers  


main() { int i=400,j=300; printf("%d..%d"); }

3 Answers  


void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(ā€œ%dā€,k); }

1 Answers  


Categories