Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Memory leak
#include<stdio.h> #include<stdlib.h> int main() { int *p= NULL;int *q; p= (int*)malloc(sizeof(int)); //Allocate memor free(p); //free the allocated memory q=(int*)malloc(sizeof(int)); *q=400000; *p= 200000; //p is dangling pointer printf("%d",*p); return 0; }
run
|
edit
|
history
|
help
0
C pattern Rhombus
141124_PI
C141105_SwitchNotas
Name pipe
B_141202_Cadenas01
tarun ceo
Static scope
1
Max2
Null deref