I would like to allocate nested data structures which are defined below with only one malloc call. Is it possible in C? If so, how can I do that?
struct s1 {
int a;
int b;
char ns1[16];
};
struct s2 {
struct s1 *ps1;
int i;
int j;
char ns2[16];
};