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

Quiz
•
Professional Development
•
University
•
Medium
KVCH CORPORATE
Used 1+ times
FREE Resource
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
Similar Resources on Wayground
10 questions
Quiz on Microsoft Teams and Forms

Quiz
•
10th Grade - University
10 questions
FMT203_Procurement and Contract Management_SU2

Quiz
•
University
14 questions
Topic 5: Input-Ouput Organisation

Quiz
•
University
10 questions
Linux fundamental - Day1

Quiz
•
University
10 questions
Concussion Assessment

Quiz
•
University
11 questions
Records Retention and Scheduling

Quiz
•
University
10 questions
Word Recognition

Quiz
•
University - Professi...
10 questions
ESL Vocabulary: Technology 1

Quiz
•
University - Professi...
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Professional Development
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms

Quiz
•
11th Grade - University
20 questions
La Hora

Quiz
•
9th Grade - University
7 questions
Cell Transport

Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?

Interactive video
•
4th Grade - University