F-Input and Output Flashcards

1
Q

What function is used to open a file?

A

fopen()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

r

A

Opens an existing file for reading purpose

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

w

A

Opens a text for writing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

a

A

Opens a text file for writing in appending mode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

r+

A

Opens a text file for both reading and writing only

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

w+

A

Opens a text file for both reading and writing; it first truncates the file to zero length if it exists, otherwise creates a file if it does not exist

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

a+

A

Opens a text file for both reading and writing; The reading will start from the beginning but writing will be appended.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What function is used to close a file?

A

fclose()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

fputc()

A

writes a character value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

fputs()

A

Writes a string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

fprintf()

A

Writes a formatted string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

fgetc()

A

Reads a character

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

fgets()

A

Reads a string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

fscanf()

A

Reads a formatted string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly