Class 11 Computer Science Chapter 6 File Handling Quiz 61 (25 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. How do you read a character from a file in C using fgetc()?
2. Which method could be used to strip specific characters from the end of a string?
3. What is the function used to create a new directory in Python?
4. What will happen if you open a file in 'w' mode and write to it?
5. In which file the data is stored in ASCII and Unicode Characters?
6. What is a stream associated with in C programming?
7. What does the 'file handle' refer to in the context of opening a file?
8. What is the function of feof in file handling?
9. What does the 'close()' method do?
10. Files are used by programs to store data needed for later use.
11. The syntax of seek() is:file ..... object.seek(offset[.reference ..... point])what is the default value of reference ..... point?
12. What does a cursor do in the context of file handling?
13. What is the function of ftell()?
14. Which operator is used to join Path objects in Python?
15. Code executed based on a condition being true
16. To read the next line of the file from the object infi, we use
17. The data files can be stored in ..... ways.
18. Joining elements together to make a string is called what?
19. In fob=open("fruits.txt", 'r'), fob refers to .....
20. If a file is opened using the with statement, what is the main advantage?
21. Choose the correct output from the options given below:#include struct st \{ int x; struct st next;\}; int main()\{ struct st temp; temp.x = 10; temp.next = temp; printf("%d", temp.next.x); return 0;\}
22. What is file handling in C++ programming?
23. Structure variable memory is allocated:
24. What is the purpose of closing a file in Python?
25. Pri ispisu primjerice "Hello world" u datoteku pozdrav.txt preko objekta ispis, pravilno je zapisati: