Files in C

Files in C

University

10 Qs

quiz-placeholder

Similar activities

Exploring Addressing Modes

Exploring Addressing Modes

University

10 Qs

C File Management

C File Management

University

10 Qs

DBMS - Concurrency Control

DBMS - Concurrency Control

University

10 Qs

Python Quiz 5

Python Quiz 5

University

10 Qs

PHP File Handling

PHP File Handling

University

12 Qs

Revision 2 MCA

Revision 2 MCA

University

13 Qs

Round 1

Round 1

University

15 Qs

OPERATING SYSTEM

OPERATING SYSTEM

University

10 Qs

Files in C

Files in C

Assessment

Quiz

Computers

University

Medium

Created by

Manoj R

Used 2+ times

FREE Resource

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 }

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?