typedef struct siblings {
char sibname[20];
char gender;
}sib;
typedef struct employee {
char empid[10];
char empname[20];
char status;
float sal;
sib ** s;
}emp;
typedef struct stackemp {
int size;
int ptrPos;
emp ** e;
}stack;
function myfunction(stack * s) {
(s->e[s->size]) = (emp *) malloc(sizeof(emp)); //this line works without any errors
(s->e[s->size]->s[0]) = (sib *)malloc(sizeof(sib)); //this line displays segmenation fault during run time
.....
....
}
This code compiles without errors but displays "Segmentation Fault" during runtime. How do I assign memory for the double pointer 's'