--:--









Quiz for Memory management techniques

Course: C Language | Subject: Unit 10 | Topic: Advanced Topics



Logo

Q1: Which function is used to allocate dynamic memory in C?

Logo

Q2: Which function is used to deallocate previously allocated memory?

Logo

Q3: What is the difference between malloc and calloc?

Logo

Q4: Which function changes the size of previously allocated memory?

Logo

Q5: What happens if malloc fails to allocate memory?

Logo

Q6: What is a memory leak?

Logo

Q7: Which function allocates memory and initializes it to zero?

Logo

Q8: Can you use realloc with a NULL pointer?

Logo

Q9: Is it safe to free a NULL pointer?

Logo

Q10: Which header file defines malloc, free, calloc, realloc?

Logo

Q11: What is dangling pointer?

Logo

Q12: How to avoid memory leaks?

Logo

Q13: What does realloc(NULL, size) do?

Logo

Q14: What is fragmentation in memory management?

Logo

Q15: Which memory management issue causes program crash?

Logo

Q16: Which function returns pointer to allocated memory initialized to zero?

Logo

Q17: Does malloc initialize the allocated memory?

Logo

Q18: What is the use of free function?

Logo

Q19: What happens if you free the same pointer twice?

Logo

Q20: Which is safest way to allocate zero-initialized array?

Are you ready to start test? Set your time limit