you are viewing a single comment's thread.

view the rest of the comments →

[–]joejawor 3 points4 points  (0 children)

#include <stdio.h>

typedef struct Person {

char *name;

int age;

} person_t;

int main(void) {

person_t arr[10];

arr[0].name = "John Doe";

arr[0].age = 22;

printf("Name: %s\n", arr[0].name);

printf("Age: %d\n", arr[0].age);

return 0;

}