Quiz 4 from File handling chapter
What do you know about the functions i.e fgetc(), getchar(), fputc(), putchar()?
fgetc():
This function is used to get/read characters from file. We pass file pointer as an input argument. This function can also be used to read/get character from standard input i.e keyboard. To get input from keyboard we pass ‘stdin’ as an input argument to this function instead of file pointer.
getchar():
This function is specifically used to get character from standard input device i.e keyboard.
fputc():
This function is used to put/store character in file. We pass file pointer as an input argument. This function can also be used to output/display character at standard output i.e screen. To display character at output screen we pass ‘stdout’ as an input argument to this function instead of file pointer.
putchar():
This function is specifically used to output/display character at standard output device i.e computer screen.
Results
Sr# | Name | Roll No | Marks |
---|---|---|---|
1 | 16-mscit-21 Shamraiz Iqbal (Repeater) | 16-mscit-21 | NA |
2 | 16-mscit-29 Iram Naz (Repeater) | 16-mscit-29 | NA |
3 | 17-mscit-01 Ayesha Kanwal | 17-mscit-01 | NA |
4 | 17-mscit-02 Arbaz Naeem | 17-mscit-02 | NA |
5 | 17-mscit-03 Adeela Rani | 17-mscit-03 | NA |
6 | 17-mscit-04 Shaista Khan | 17-mscit-04 | NA |
7 | 17-mscit-05 Asma Benish | 17-mscit-05 | NA |
8 | 17-mscit-06 Maria Ummar | 17-mscit-06 | NA |
9 | 17-mscit-07 Azka Riaz | 17-mscit-07 | NA |
10 | 17-mscit-08 Shar Bano | 17-mscit-08 | NA |
11 | 17-mscit-09 Sahrish Ansar | 17-mscit-09 | NA |
12 | 17-mscit-10 Maryam Akram | 17-mscit-10 | NA |
13 | 17-mscit-11 Seerat Zhra | 17-mscit-11 | NA |
14 | 17-mscit-12 Sana Sultan | 17-mscit-12 | NA |
15 | 17-mscit-13 Kiran Yasmeen | 17-mscit-13 | NA |
16 | 17-mscit-14 Bilal Afzal | 17-mscit-14 | NA |
17 | 17-mscit-15 Pakeeza Arshad | 17-mscit-15 | NA |
18 | 17-mscit-16 Muhammad Zia Awan | 17-mscit-16 | NA |
19 | 17-mscit-17 Fariha Maryam | 17-mscit-17 | NA |
20 | 17-mscit-18 Muhammad Jahangir Alam | 17-mscit-18 | NA |
21 | 17-mscit-19 Tahseena Kanwal | 17-mscit-19 | NA |
22 | 17-mscit-20 Arslan Habib | 17-mscit-20 | NA |