Question 1
What is a 'Wild Pointer' in C programming?
Wild pointers are created when a pointer variable is declared but not initialized to any address or NULL before access.
What is a 'Wild Pointer' in C programming?
Wild pointers are created when a pointer variable is declared but not initialized to any address or NULL before access.
What is a 'Dangling Pointer' in C and C++?
Dangling pointers arise when memory referenced by a pointer is freed/deallocated without modifying the pointer to NULL.
Which C standard library function alters the size of a previously allocated dynamic memory block without changing its existing content?
realloc(ptr, new_size) resizes a previously allocated memory block pointed to by ptr, preserving existing data up to the minimum of old and new sizes.
In C, how does the function call 'calloc(n, size)' differ from 'malloc(n * size)'?
calloc(n, size) allocates space for n elements of size bytes and initializes all allocated bytes to zero. malloc allocates the requested bytes without initialization.
What is a 'Memory Leak' in C and C++ applications?
Memory leaks occur when heap memory allocated via malloc/new is not released using free/delete before losing all pointer references to it.