#include<stdio.h>
#include<conio.h>
int main()
{
int b=5;
int *a;
a=(int *)malloc(1*sizeof(int));
*a=b;
printf("\nb=%d\n*a=%d",b,*a);
printf("\nEnter a:");
scanf("%d",a);
getch();
printf("\nb=%d\n\n*a=%d",b,*a);
return 0;
}
The Above code never gets exeuted past the point of input of 'a'. It takes the input value but crashes and I am unable to figure it how to correct it. Please Help!