
Mastering C Programming Concepts
Quiz
•
Other
•
University
•
Practice Problem
•
Hard
Ramya A
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a pointer in C and how is it used?
A pointer in C is a special data type that can only hold integer values.
A pointer in C is a type of function that returns a value.
A pointer in C is a variable that holds the address of another variable, enabling direct memory access and manipulation.
A pointer in C is a variable that stores a string of characters.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the difference between stack and heap memory.
Stack memory is for static allocation and is faster; heap memory is for dynamic allocation and is larger but slower.
Stack memory is larger and slower; heap memory is for static allocation and is faster.
Heap memory is for static allocation and is smaller; stack memory is for dynamic allocation and is slower.
Stack memory is for dynamic allocation and is larger; heap memory is for static allocation and is faster.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the common data structures available in C?
Arrays, linked lists, stacks, queues, trees, hash tables
Strings, files, objects, enums
Dictionaries, lists, arrays, classes
Graphs, matrices, sets, tuples
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you open and close a file in C?
Use fopen() to open a file and fclose() to close it.
Use read() to open a file and write() to close it.
Use open() to open a file and close() to close it.
Call openFile() to open a file and closeFile() to close it.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is dynamic memory allocation and how is it done in C?
Dynamic memory allocation is done using static arrays.
Dynamic memory allocation in C is done using functions like malloc(), calloc(), realloc(), and free() to manage memory at runtime.
Dynamic memory allocation is managed using global variables.
Memory allocation in C is only possible at compile time.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Describe how to handle errors in C using errno.
Check the return value of every function without using errno.
Use the 'error' function to handle errors in C.
Use the global variable 'errno' to check for errors after function calls in C.
Ignore errors and continue execution without any checks.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'malloc' function in C?
To free up memory used by the program.
To allocate memory for global variables.
To initialize static memory at compile time.
To allocate dynamic memory on the heap.
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
12 questions
Conditional Statements : Quiz - 4
Quiz
•
University
10 questions
Unit 7 Review
Quiz
•
University
8 questions
Meme Quiz
Quiz
•
1st Grade - Professio...
15 questions
UTAR Industrial Session
Quiz
•
University - Professi...
15 questions
cookies
Quiz
•
University
15 questions
Labor Relations and Negotations 1
Quiz
•
University - Professi...
10 questions
Unit 5H Group 2
Quiz
•
University
10 questions
Driving Theory Test: Alertness
Quiz
•
KG - Professional Dev...
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Other
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University
