Files in C

Files in C

University

10 Qs

quiz-placeholder

Similar activities

Scratch

Scratch

KG - Professional Development

10 Qs

Google Docs

Google Docs

5th Grade - University

13 Qs

8051-MCQ

8051-MCQ

University

15 Qs

Quiz OSK 14

Quiz OSK 14

University

10 Qs

Simdig

Simdig

12th Grade - University

10 Qs

PICMAKER

PICMAKER

University

15 Qs

Vistacreate

Vistacreate

University

15 Qs

Tes Awal Modul 5

Tes Awal Modul 5

University

10 Qs

Files in C

Files in C

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Manoj R

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is file handling in C?

File handling in C is the process of working with files to perform input/output operations.

File handling in C is the process of baking cookies

File handling in C is the process of skydiving

File handling in C is the process of gardening

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you open a file in C?

fopen()

create()

read()

open()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What function is used to close a file in C?

fdelete()

fopen()

fclose()

fclose(

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you read from a file in C?

fopen(), fwrite(), fclose()

open(), read(), close()

fopen(), read(), fclose()

fopen(), fgets() or fread()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the function to write to a file in C?

fwrite()

fput()

fopen()

fscan()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between 'r' and 'w' modes when opening a file in C?

The 'r' mode is for reading files, and the 'w' mode is for appending files.

The 'r' mode is for reading files, and the 'w' mode is for writing files.

The 'r' mode is for writing files, and the 'w' mode is for reading files.

The 'r' mode is for reading and writing files, and the 'w' mode is for reading files.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you check if a file has been successfully opened in C?

if (file_pointer == -1) { // File opened successfully }

if (file_pointer != NULL) { // File opened successfully }

if (file_pointer == NULL) { // File opened successfully }

if (file_pointer == 0) { // File opened successfully }

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?