#include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> #include <time.h> #include <unistd.h> typedef struct score_s{ char name[20]; int scores[0]; }score; int main() { score *scoreInfo = malloc(sizeof(score) + sizeof(int) * 3); strcpy(scoreInfo->name, "guanxianseng"); scoreInfo->scores[0] = 100; scoreInfo->scores[1] = 110; scoreInfo->scores[2] = 120; printf("name:%s ", scoreInfo->name); for (int i = 0; i < 3; i++) { printf("score:%d ", scoreInfo->scores[i]); } printf(" "); return 0; }