Sail E0 Webinar
Question

ftell() returns the current position of the pointer in a file stream.


Options:
A .  True
B .  False
Answer: Option A


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 ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers