Files in C

Files in C

University

10 Qs

quiz-placeholder

Similar activities

Quis Administrasi Sistem Jaringan

Quis Administrasi Sistem Jaringan

University

15 Qs

Teknologi Informasi

Teknologi Informasi

University

15 Qs

Desain Grafis Kelas ''COVID-19"

Desain Grafis Kelas ''COVID-19"

12th Grade - University

10 Qs

Abhyudaya coding class -  Grade 7

Abhyudaya coding class - Grade 7

6th Grade - University

10 Qs

2.4 - 2.6

2.4 - 2.6

University

15 Qs

L1 - Computer Networks

L1 - Computer Networks

University

13 Qs

Create a Website 1

Create a Website 1

KG - University

10 Qs

Data Structures: Linked Lists and Hashtables

Data Structures: Linked Lists and Hashtables

11th Grade - University

14 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?