What happens when you try to free a pointer that was not allocated by malloc/calloc/realloc?
In a dynamic stack implementation for competitive programming, how should you handle reallocation when the stack becomes full?
Which of these represents proper error handling for malloc in competitive programming?
How many bytes are allocated by malloc(sizeof(int) * 10) on a system where int is 4 bytes?
Which of the following correctly deallocates a 2D dynamically allocated array created as int **arr?
Advertisement
What is the primary difference between calloc() and malloc() in C?
In a dynamic queue implementation, if front pointer is NULL, what does it indicate?
What happens when realloc() is called on a pointer allocated by malloc() with a larger size?
For implementing a dynamic circular buffer of size n, how many pointers are minimally required?
Which scenario is most likely to cause a segmentation fault in dynamic memory?
In competitive programming for graph problems, if adjacency list uses dynamic arrays, what is the time complexity of adding an edge?
What is the correct way to store variable-length strings dynamically?
If malloc() returns NULL, what should a program do?
In implementing a dynamic doubly-linked list, what additional field is required compared to singly-linked list?
For a dynamic hash table with chaining, if collision occurs, the new element should be inserted where?
What is the memory overhead when allocating 1000 integers vs 1 integer in a system with malloc metadata?
In competitive coding, when implementing dynamic trees, which traversal is most suitable for level-order?
Which memory allocation technique provides better locality of reference for accessing array elements?