| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> 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} }; int main(void) { struct student_info tmp[4]; memcpy(tmp, students, sizeof(students)); for (int i = 0; i < 4; i++) { printf("%s %d %f\n", tmp[i].name, tmp[i].age, tmp[i].weight); } return 0; } | cs |


struct_memcpy.png [20 KB]
struct_memcpy.txt [1 KB]
ÀڷᱸÁ¶ ½Ç½À°Ô½ÃÆÇ