scat.c
来自「linux下的C语言开发」· C语言 代码 · 共 29 行
C
29 行
/*-*//******************************************************** * Question: * * Why does the following program print * * "John @#$24" instead of John Doe? * * (Your results may vary.) * ********************************************************//*+*/#include <stdio.h>#include <string.h>char first[100]; /* First name of the person */char last[100]; /* Last name of the person *//* First and last name combined */char full[100];int main() { strcpy(first, "John"); strcpy(last, "Doe"); strcpy(full, first); strcat(full, ' '); strcat(full, last); printf("The name is %s\n", full); return (0);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?