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

📄 len2.c

📁 linux下的C语言开发
💻 C
字号:
/*-*//******************************************************** * Answer to question 8.1.				* *							* * For full details, see the book.			* ********************************************************//*+*/#include <stdio.h>int  length(char string[]){    int             index;      /* index into the string */    /*     * Loop until we reach the end of string character     */    for (index = 0; string[index] != '\0'; ++index)        continue; /* do nothing */    return (index);}int main(){     char line[100];	/* Input line from user */     while (1) {        printf("Enter line:");        fgets(line, sizeof(line), stdin);	printf("Length (including newline) is: %d\n", length(line));    }}

⌨️ 快捷键说明

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