mirror of
https://github.com/devproje/devproje.git
synced 2025-04-22 08:39:53 +09:00
Create main.c
This commit is contained in:
parent
b313779511
commit
154fc23c34
1 changed files with 20 additions and 0 deletions
20
main.c
Normal file
20
main.c
Normal 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;
|
||||
}
|
Loading…
Reference in a new issue