If it does not exist, an error is returned
If it does not exist, it is created
If it exists, then data is written at the end
If it exists, error is returned
What does fp point to in the program?
int main() { FILE *fp; fp=fopen("trial", "r"); return 0; }
The first character in the file
A structure which contains a char pointer which points to the first character of a file
The name of the file
The last character in the file
TRUE
FALSE
Key sequenced structures, entry sequenced structures
Key sequenced structure, exit sequenced structures
Entry sequenced structures, exit sequenced structures
None of the above
records that have an equivalent value for a given secondary index item are linked together to form a list
records are loaded in ordered sequence defined by collating sequence by content of key
records are directly accessed by records key field
none of the above
read a character from STDIN
read a character from a file
read all file
read file randomly
fend( )
endf( )
EOF
FEND
-1
0
1
10
FILE is a keyword in C for representing files and fp is a variable of FILE type.
FILE is a structure and fp is a pointer to the structure of FILE type
FILE is a stream
FILE is a buffered stream
A character string containing the name of the file & the second argument is the mode
A character string containing the name of the user & the second argument is the mode
A character string containing file poniter & the second argument is the mode
None of the mentioned
Nothing
NULL
Depends on compiler
rewind() doesn't work for empty files
rewind() may fail for large files
In rewind, there is no way to check if the operations completed successfully
All of the above
int type
char * type
struct type
End of files is reached
When getc() fails to read a character
Both of the above
FILE *fopen(const *filename, const char *mode)
FILE *fopen(const *filename)
FILE *open(const *filename, const char *mode)
FILE open(const*filename)
create text file for writing, discard previous contents if any
create text file for update, discard previous contents if any
create text file for writing, do not discard previous contents if any
create text file for update, do not discard previous contents if any