Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is datatype of FILE? [duplicate]

Tags:

c

What is data type of FILE in C or in other language? Is it an integer or structure or having no particular data type?

like image 492
Munavar Fairooz Avatar asked Jul 19 '14 18:07

Munavar Fairooz


1 Answers

It is what is typically termed an opaque data type, meaning it's typically declared as a simple structure, and then internally in the OS libraries the FILE pointer is cast to the actual date-type of the data-structure that the OS will use access data from a file. A lot of these details are system-specific though, so depending on the OS, the definition may differ.

like image 141
Jason Avatar answered Oct 20 '22 16:10

Jason