DAY 9 File Handling & Dynamic Memory Allocation - 20th JUNE 24
Quiz
•
Professional Development
•
University
•
Practice Problem
•
Medium
KVCH CORPORATE
Used 1+ times
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
12 questions
Getting to Know Geoinformatics Course
Quiz
•
University
10 questions
ATIVIDADE INTERATIVA
Quiz
•
6th Grade - University
14 questions
Memory - Pre test
Quiz
•
University
8 questions
Communities of Practice
Quiz
•
12th Grade - University
15 questions
ICT uu
Quiz
•
University
10 questions
QUIZ NS WZ
Quiz
•
12th Grade - University
14 questions
Technology Quiz
Quiz
•
KG - University
15 questions
DEPARTMENT AND BRANCH ACCOUNTING 11.5.21
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
