--:--









Quiz for Dynamic memory allocation calloc

Course: C Language | Subject: Unit 6 | Topic: Pointers



Logo

Q1: Which header file is required to use calloc() in C?

Logo

Q2: What is the prototype of calloc() function in C?

Logo

Q3: What is the main difference between malloc() and calloc()?

Logo

Q4: If calloc() fails, what does it return?

Logo

Q5: What does calloc(5, sizeof(int)) do?

Logo

Q6: Which function is used to free memory allocated by calloc()?

Logo

Q7: What happens if you forget to free memory allocated by calloc()?

Logo

Q8: calloc(0, sizeof(int)) will return?

Logo

Q9: calloc() is slower than malloc() because?

Logo

Q10: Which of the following is valid calloc() usage?

Logo

Q11: What type of pointer does calloc() return?

Logo

Q12: What should be done before accessing calloc() allocated memory?

Logo

Q13: Which statement is true about calloc()?

Logo

Q14: What will calloc(3, 0) do?

Logo

Q15: Can calloc() allocate memory for a struct?

Logo

Q16: calloc(2, sizeof(char)) will allocate how many bytes?

Logo

Q17: Which is the correct way to release calloc() memory?

Logo

Q18: calloc() can be used for?

Logo

Q19: What is sizeof(int) on a 32-bit system usually?

Logo

Q20: calloc(4, sizeof(float)) will allocate?

Are you ready to start test? Set your time limit