You are on page 1of 2

if a file does not exist if it is opened for writing or appending it is created if

possible- true

in c++ a dynamic memory structure always use pointer-true daw

fopen returns null if there is an error in opening the file-true

a structure definition placed after the main function- false

a strucuture definition must be terminated with -;

in declaring a strcuture, a structure tag is needed- true

the stream ic alled an input stream if the flow is out your program-
ifstream=read,in; ofstream=write,out

fgetc function returns the next character from the stream reffered to by the file
pointer- true,
the current, and next, then next, etc.

using a binary file mode causes a program to tranfer data from memory to a file-
true

opening a existing file for appending causes the previous file to be discarded
while opening for witing
preserves them-false

inside the struct definition members are only declared with the same data types-
false

a file mode to truncate if a file exists


-ios_base::trunc
it points to a structure that contains about the file
-file array, file pointer, structure, file stream

is it a flow of characters or other kinf of data


-stream

a function that breaks the connection between the file pointer and the externel
name established by fopen
-fclose-
afunc that writes a char to a file
- fputc
a smaller value in a strucuture is called -struc value or mem value

a func that read the next input line from the file pointer into the char array
line-fgets

operator used to specify a member variable of a structure

a file mode to open file for writing

it is a group of elements which are of diff type as an object- mali ay func,vars,


struct

c++ file stream classes inherit a stream state member from-ios_base class

fopen= lib func used before reading and writing a file


r=reading mode
w=writing mode
a=appending mode
r+=reading and writing
w+=also reading and writing, but discards previous files

a+=rading and writing at the end of the file

fclose= inverse of fopen, break connection netween file pointer and the
external name that was established by the fopen function

You might also like