Which function is used to open a file in C?
What does the mode 'rb' mean in fopen()?
Which function is used to close a file in C?
Which mode opens a file for writing and truncates it if it exists?
What does fgets() function do?
Advertisement
Which function writes formatted data to a file?
What is the purpose of ftell() function?
Which function sets the file position to a specific location?
What does feof() function check?
What is the difference between fgetc() and getc()?
Which mode allows both reading and writing without truncating?
What does fwrite() function return?
What is the purpose of rewind() function in file handling?
Consider the code: FILE *fp = fopen("data.txt", "r"); if(fp == NULL) { printf("Error"); } What does this check?
What happens when fseek() is used with SEEK_END as origin?
Write a code snippet to read 100 bytes from a file. Which is correct?
Which of the following correctly implements appending to a file?
When opening a file in 'w' mode, what happens if the file already exists?
Which of the following file modes in fopen() allows reading only?
In file handling, what does the 'b' flag in file modes like 'rb' or 'wb' indicate?