Create main.c

This commit is contained in:
WH64 2021-11-18 22:27:17 +09:00 committed by GitHub
parent b313779511
commit 154fc23c34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

20
main.c Normal file
View file

@ -0,0 +1,20 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
struct Person {
char name[20];
int age;
};
int main(int argc, char **argv) {
struct Person *dev = malloc(sizeof(struct Person));
strcpy(dev->name, "DEV_Project");
dev->age = 17; // 한국 만 나이
printf("Hello! I'm %d years old %s Nice to meet you!\n", dev->age, dev->name);
free(dev);
return 0;
}