str.c

来自「linux下的C语言开发」· C语言 代码 · 共 22 行

C
22
字号
/*-*//******************************************************** * Name:						* *	string						* *							* * Purpose:						* *	Demonstrate how to use strcpy (string copy)	* *							* * Usage:						* * 	Run it and find out the name of "Sam"		* ********************************************************//*+*/#include <string.h>#include <stdio.h>char name[30];    /* First name of someone */int main(){    strcpy(name, "Sam");    /* Initialize the name */    printf("The name is %s\n", name);    return (0);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?