Question
ftell() returns the current position of the pointer in a file stream.
Answer: Option A
#include<stdio.h>
int main(void)
{
FILE *stream;
stream = fopen("MYFILE.TXT", "w+");
fprintf(stream, "This is a test");
printf("The file pointer is at byte %ld\n", ftell(stream));
fclose(stream);
return 0;
}
Was this answer helpful ?
The ftell() function shall obtain the current value of the file-position indicator for the stream pointed to by stream.
Example:
#include<stdio.h>
int main(void)
{
FILE *stream;
stream = fopen("MYFILE.TXT", "w+");
fprintf(stream, "This is a test");
printf("The file pointer is at byte %ld\n", ftell(stream));
fclose(stream);
return 0;
}
Was this answer helpful ?
More Questions on This Topic :
Question 4.
What will function gcvt() do?
....
Submit Solution