please help to find my mistek
here is a simple code of c language, it is about malloc,calloc and realloc. the last two for loop are not working properly, I am not getting any error massage from compiler please help me to find my mistek here is a code: #include<stdio.h> #include<stdlib.h> void main() { int *m,*o,n,i,p,v; m=(int*)malloc(sizeof(int)*n); printf("how many number you wanna add(malloc):\n"); scanf("%d",&n); printf("enter the number:\n"); for(i=0;i<n;i++) { scanf("%d",&m[i]); } for(i=0;i<n;i++) { printf("%d",m[i]); } free(m); printf("\n_______________\n\n"); o=(int*)calloc(v,sizeof(int)); printf("how many number you wanna add(calloc):\n"); scanf("%d",&v); printf("enter the number:\n"); for(i=0;i<v;i++) { scanf("%d",&o[i]); } for(i=0;i<v;i++) { printf("%d",o[i]); } free(o); printf("\nenter the new size of malloc:\n"); scanf("%d",&p); m=(int*)realloc(m,sizeof(int)*p); if(p>n) { printf("add the numbers in malloc:\n"); for(i=0;i<p;i++) { scanf("%d",&m[i]); } } for(i=0;i<p;i++) { printf("%d",m[i]); } free(o); }