⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 full.c

📁 linux下的C语言开发
💻 C
字号:
/*-*//******************************************************** * Name:						* *	concat						* *							* * Purpose:						* *	Demonstrates how to put strings together using	* *	strcat.						* *							* * Usage:						* * 	Run it and see my full name.			* *							* * Notes:						* *	Don't try to pronounce the last name.		* ********************************************************//*+*/#include <string.h>#include <stdio.h>char first[100];        /* first name */char last[100];         /* last name */char full_name[200];    /* full version of first and last name */int main(){    strcpy(first, "Steve");       /* Initialize first name */    strcpy(last, "Oualline");     /* Initialize last name */    strcpy(full_name, first);     /* full = "Steve" */    /* Note: strcat not strcpy */    strcat(full_name, " ");       /* full = "Steve " */    strcat(full_name, last);      /* full = "Steve Oualline" */    printf("The full name is %s\n", full_name);    return (0);}

⌨️ 快捷键说明

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