This code is crashing, please tell me for what all I need to assign memory.
Thanks
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
struct s1
{
char *p1;
};
struct s2
{
struct s1 *p2;
};
struct s3
{
struct s2 *p3;
}*p4=NULL;
int main()
{
char a='a';
p4=malloc(sizeof(struct s3));
p4->p3->p2->p1=&a;
printf("%c",*(p4->p3->p2->p1));
return 0;
}