Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- struct employee {
- char name[10];
- int year;
- int pay;
- };
- int main(void)
- {
- struct employee Lee;
- struct employee *Sptr = &Lee;
- strcpy(Sptr->name, "이순신");
- Sptr->year = 2005;
- Sptr->pay = 2900;
- printf("\n 이름 : %s", Sptr->name);
- printf("\n 입사 : %d", Sptr->year);
- printf("\n 연봉 : %d\n\n", Sptr->pay);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment