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 |
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
Is this code legal? int *ptr; ptr = (int *) 0x400;
Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }
29 Answers IBM, TCS, UGC NET, Wipro,
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?
main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%d\n”", x--); } } a. 4, 3, 2, 1, 0 b. 1, 2, 3, 4, 5 c. 0, 1, 2, 3, 4 d. none of the above
main() { printf("%x",-1<<4); }
abcdedcba abc cba ab ba a a
main() { int i=10; void pascal f(int,int,int); f(i++,i++,i++); printf(" %d",i); } void pascal f(integer :i,integer:j,integer :k) { write(i,j,k); }
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }
main() { 41printf("%p",main); }8
main() { clrscr(); } clrscr();