answersLogoWhite

0

What is a file pointer?

Updated: 12/16/2022
User Avatar

Wiki User

14y ago

Best Answer

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);

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a file pointer?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can a shareable file be opened in a special way so when another process also reads it my process's file pointer is not advanced?

Your process' file pointer has nothing to do with the other process' file pointer.


Which function is used to determine the position of the put pointer in a file in c plus plus?

The function ftell returns the position of the file pointer for a file.


What is the different between header file and header pointer?

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).


What is an anchor pointer within a marquee?

File


What are the different types of files and how End Of File of a full represented by a pointer?

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


How do you select a file in Macbook air?

Put the cursor (pointer) over the file and click once.


How to Write a character in file?

putc('q', file); /* assume file is a pointer-to-FILE */ /* Note: I answer you assuming that you know everything else about files */


Which function is used to determine the position of the put pointer into the file?

tellp()


What is Fgetc and fputc in c?

fgetc gets a character from a file using a file pointer.the syntax is fget(fp) where fp is a pointer to the file


Which function is used to determine the position of the put pointer in the file?

pos_type tellp();


What is step involve is using data file in c plus plus programming?

Declaration of file pointer opening of file in desired mode. performing the desired operation. closing the file


Which function is used to move file pointer from any position in file in c language?

FILE-level: ftell/fseek, fgetpos/fsetpos handle-level: lseek