Files in C

Files in C

University

10 Qs

quiz-placeholder

Similar activities

Archivos C

Archivos C

University

9 Qs

Tes Awal AlPro Modul 6

Tes Awal AlPro Modul 6

University

10 Qs

Programming in C

Programming in C

University

10 Qs

C++ Faili (1)

C++ Faili (1)

University

12 Qs

File Handling with Python

File Handling with Python

12th Grade - University

7 Qs

CSC1003-QUIZ-1

CSC1003-QUIZ-1

University

10 Qs

OPERATING SYSTEM (COMPUTER ARCHITECTURE)

OPERATING SYSTEM (COMPUTER ARCHITECTURE)

University

10 Qs

ITP  Quiz

ITP Quiz

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?