C primer plus(第六版) 第四章答案 /* 第一题 */ #include<stdio.h> int main(void) { char first_name[20],last_name[20]; printf("Please input your first_name.\n"); scanf("%s",first_name); printf("Please input your last_name.\n"); scanf("%s",last_name); printf("%s %s",first_name,last_name); return 0; } /* 第二题 */ #include<stdio.h> #include<string.h> int main(void) { char first_name[20]; char last_name[20]; int length_first = 0; int length_last = 0; length_first = strlen(first_name); length_last = strlen(last_name); printf("Please input your first_name.\n"); scanf("%s",first_name); printf("Please input your last_name.\n");