char name[4][10] = {"È«±æµ¿", "À̼ø½Å", "°°¨Âù", "À¯°ü¼ø"};
char tmp[10];
¹®ÀÚ¿ÀÇ °æ¿ì ¾Æ·¡¿Í °°Àº ¹æ¹ýÀ¸·Î ¹®ÀÚ¿À» À̵¿ÇÏ´Â °ÍÀº ºÒ°¡´ÉÇÔ.
tmp = name[2] ;
±×·¯¹Ç·Î, strcpy() ÇÔ¼ö¸¦ »ç¿ëÇؼ ¹®ÀÚ¿À» À̵¿ÇؾßÇÔ
strcpy(tmp,name[2]);
±×·¸Áö¸¸, ±¸Á¶Ã¼ÀÇ °æ¿ì´Â
struct student_info {
char name[10];
int age;
float weight;
};
struct student_info students[4] = {
{"È«±æµ¿", 504, 67.5},
{"À̼ø½Å", 703, 80.3},
{"°°¨Âù", 645, 77.0},
{"À¯°ü¼ø", 205, 56.5}};
struct student_info tmp;
tmp = students[2];
À§Ã³·³ º¯¼ö ÀüüÀÇ ³»¿ëÀ» Åë°·Î À̵¿ÇÏ´Â °ÍÀÌ °¡´ÉÇÔ
À§ÀÇ ±â´ÉÀ» Å×½ºÆ® ÇϽÿÀ.