DAY 9 File Handling & Dynamic Memory Allocation - 20th  JUNE 24

DAY 9 File Handling & Dynamic Memory Allocation - 20th JUNE 24

University

10 Qs

quiz-placeholder

Similar activities

Cloud Computing

Cloud Computing

University - Professional Development

10 Qs

ICT in education

ICT in education

1st Grade - Professional Development

10 Qs

Google!

Google!

KG - University

15 Qs

Bài 1 - Chương trình bảng tính - Tin 7

Bài 1 - Chương trình bảng tính - Tin 7

7th Grade - University

10 Qs

HADOOP | PIG LATIN

HADOOP | PIG LATIN

University - Professional Development

9 Qs

Digital Citizenship Quiz

Digital Citizenship Quiz

KG - Professional Development

15 Qs

Online Digital Communication

Online Digital Communication

University

10 Qs

Windows Basics

Windows Basics

10th Grade - Professional Development

10 Qs

DAY 9 File Handling & Dynamic Memory Allocation - 20th  JUNE 24

DAY 9 File Handling & Dynamic Memory Allocation - 20th JUNE 24

Assessment

Quiz

Professional Development

University

Practice Problem

Medium

Created by

KVCH CORPORATE

Used 1+ 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 the primary function of fopen() in C programming?

To open a file for reading

To allocate memory dynamically

To close a file

To delete a file

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which mode in fopen() allows both reading and writing to a file without truncating it?

"r"

"w"

"a"

"r+"

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you close a file in C using fclose()?

fclose(file);

close(file);

closeFile(file);

file.close();

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will feof() return when the end of file is reached in C?

0

1

-1

NULL

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you read a character from a file in C using fgetc()?

fgetc(file);

readChar(file);

getChar(file);

file.getc();

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to dynamically allocate memory in C?

malloc()

allocate()

new()

calloc()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will malloc() return if it fails to allocate memory?

NULL

-1

0

1

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

Already have an account?