Question: What is the problem with following code? A. Memory Leakage B. Dangling pointer C. Compiler error D. None of the the above #include #include void
What is the problem with following code?

A. Memory Leakage
B. Dangling pointer
C. Compiler error
D. None of the the above
#include #include void fun () { int *ptr = (int *) malloc (sizeof (int)); printf(" Memory allocated dynamically for integer variable"); } int main () { fun(); return 0; }
Step by Step Solution
3.45 Rating (158 Votes )
There are 3 Steps involved in it
A Explanation The problem is memory l... View full answer
Get step-by-step solutions from verified subject matter experts
