Chapter - 13: File Input-Output

If a file contains the line “I am a boy\r\n” then on reading this line into the array str[ ] using fgets( ) what would str[ ] contain?


B
Sections
2
Exercises

A

B

C

1

2

3

4

5

6

7

8

9

1. I am a boy\r\n\0
2. I am a boy\r\0
3. I am a boy\n\0
4. I am a boy


Ans: 3. I am a boy\n\0


© 2020 Garbage Valuegarbage value logo