A file pointer is an opaque object that refers to a file. Opaque means that you should not attempt to delve into its specific value, other than to use it as a file pointer. FILE *fp; /* fp is the file pointer */ fp = fopen("somefile.txt"); if (fp == NULL) ...{exception}... fprintf(fp, "Hello somefile.txt"); fclose(fp);
Header file is a file which is meant to be included into another file during compilation. Examples: string.h, stdio.h, inttypes.h. Header pointer is a pointer to an object called header (for example header of a linked list).
File
pos_type tellp();
Declaration of file pointer opening of file in desired mode. performing the desired operation. closing the file
FILE-level: ftell/fseek, fgetpos/fsetpos handle-level: lseek
Your process' file pointer has nothing to do with the other process' file pointer.
The function ftell returns the position of the file pointer for a file.
Header file is a file which is meant to be included into another file during compilation. Examples: string.h, stdio.h, inttypes.h. Header pointer is a pointer to an object called header (for example header of a linked list).
File
In an input file, the location of the next item to be read is maintained by a file pointer or file cursor. This pointer indicates the current position in the file, allowing the system to know where to read the next byte or block of data. As data is read, the pointer automatically advances to the next position, ensuring sequential access to the file's contents.
There are two file types in C++ namely, text file and binary file. In text file EOF or end of file is represented by an end of file character having ASCII 26. In binary files EOF or end of file is represented by NULL in the file pointer
Put the cursor (pointer) over the file and click once.
putc('q', file); /* assume file is a pointer-to-FILE */ /* Note: I answer you assuming that you know everything else about files */
The function fread() in C can be used to read a specified number of elements from a file. It takes as arguments the pointer to the buffer, size of each element, number of elements to read, and the file pointer.
tellp()
fgetc gets a character from a file using a file pointer.the syntax is fget(fp) where fp is a pointer to the file
pos_type tellp();