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
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 |
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 |
void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }
main() { char a[4]="HELL"; printf("%s",a); }
main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
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
Finding a number which was log of base 2
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?
main() { char c=' ',x,convert(z); getc(c); if((c>='a') && (c<='z')) x=convert(c); printf("%c",x); } convert(z) { return z-32; }
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]); }
main() { int i=400,j=300; printf("%d..%d"); }
void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(ā%dā,k); }