#include <stdio.h>
#include <stdlib.h>
typedef struct {
int n;
char ch;
} StructA;
typedef struct {
float f;
double d;
} StructB;
int main(void) {
StructA* sa;
StructB* sb;
sa = malloc(sizeof(StructA) + sizeof(StructB));
sb = (StructB *)&sa[1];
sa->n = 639;
sa->ch = 'z';
sb->f = 3.14f;
sb->d = 263745.8312;
printf("%d %c %f %lf", sa->n, sa->ch, sb->f, sb->d);
free(sa);
return 0;
}
/*
run:
639 z 3.140000 263745.831200
*/