1
0

09-struct.c 247 B

1234567891011121314151617
  1. #include <stdio.h>
  2. typedef struct {
  3. char name[20];
  4. int age;
  5. } Person;
  6. int main() {
  7. Person person;
  8. strcpy(person.name, "John Doe");
  9. person.age = 25;
  10. printf("Name: %s\n", person.name);
  11. printf("Age: %d\n", person.age);
  12. return 0;
  13. }