Desc :

 


Source Code :

#include <stdio.h>
#include <string.h>

void print(struct tagStaff *pone);

struct tagStaff
{
	char name[10];
	char phone[20];
	char address[100];
};

void main()
{
	struct tagStaff one;
	struct tagStaff *pone;

	pone = &one;

	strcpy((*pone).name, "홍길동");
	strcpy((*pone).phone, "010-1234-5678");
	strcpy((*pone).address, "서울시 강남구");

	print(&one);
}

void print(struct tagStaff *pone)
{
	printf("이름: %s\n", pone->name);
	printf("전화: %s\n", pone->phone);
	printf("주소: %s\n", pone->address);
}

 


Result :

 

안올라가져서 섞여버렸다,,,,,,,,,,,,,, 안돼,,,,,,,,,,,,,,,,,,,

+ Recent posts