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

A program that will create a movie seat reservation. The program will display the summary seats and its status. The user will be ask what seat no. to be reserved, then it will go back again to the summary to display the updated seat status. If the seat no. is already reserved then it will prompt an error message. And also if the input seat no is out of range then it will also prompt an error message. The program is continuously running. Termination of the program will depends on how the programmer will apply. Sample output: Movie Seats Reservation Summary of Seats: Seat 1: Available Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 1 Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 6 The Seat no. is out of range! Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 1 The Seat no. is already reserved! Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 0 GoodBye... Thank You!!!

0 Answers  


What is wrong with the following code? int *foo() { int *s = malloc(sizeof(int)100); assert(s != NULL); return s; }

1 Answers  


main() { show(); } void show() { printf("I'm the greatest"); }

2 Answers  


find simple interest & compund interest

2 Answers  


Write a procedure to implement highlight as a blinking operation

2 Answers  






main() { int i; i = abc(); printf("%d",i); } abc() { _AX = 1000; }

2 Answers  


How to access command-line arguments?

4 Answers  


Is the following code legal? struct a { int x; struct a b; }

1 Answers  


main() { int i=10,j=20; j = i, j?(i,j)?i:j:j; printf("%d %d",i,j); }

2 Answers   Adobe, CSC,


main() { clrscr(); } clrscr();

2 Answers  


How can i find first 5 natural Numbers without using any loop in c language????????

2 Answers   Microsoft,


main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }

1 Answers  


Categories