摘要: C函数 关键字return 运算符 *、& 如何把指针变量用作函数参数 函数类型 递归 return的使用 示例代码: /** * @Author: Lucifer * @Date: 5/3/2023, 4:07:12 PM * @LastEditors: Lucifer * @LastEditTi 阅读全文
posted @ 2023-05-04 16:30 俊king 阅读(77) 评论(0) 推荐(0)
摘要: C菜单响应程序 需求: 提供一个响应程序 用户输入正确得到响应 用户输入错误重新输入 注意: 混合字符和数值输入可以识别 处理用户输入Enter键 示例代码: /** * @Author: Lucifer * @Date: 5/1/2023, 2:43:11 PM * @LastEditors: L 阅读全文
posted @ 2023-05-04 16:29 俊king 阅读(15) 评论(0) 推荐(0)
摘要: C统计单词程序 需求描述 读取并报告单词的数量 计算字符数和行数 识别单词的处理 把一个单词定义为不含空白的字符序列 既:没有空格、制表符、换行符 /** * @Author: Lucifer * @Date: 4/30/2023, 2:12:10 PM * @LastEditors: Lucife 阅读全文
posted @ 2023-05-04 16:28 俊king 阅读(32) 评论(0) 推荐(0)
摘要: C字符输入/输出和输入验证 介绍输入、输出、缓冲输入、无缓冲输入区别 通过键盘模拟文件结尾条件 使用重定向把程序和文件相连接 创建更友好的用户界面 单字符I/O getchar() putchar() shell当中的echo示例: /** * @Author: Lucifer * @Date: 5 阅读全文
posted @ 2023-05-04 16:28 俊king 阅读(87) 评论(0) 推荐(0)
摘要: C控制语句 default、goto 更复杂的测试表达式中用逻辑运算符组合关系表达式 C条件表达式 switch语句 continue、goto语句 I/O函数getchar()和putchar() ctype.h宏文件字符分析函数 if分支语句 示例代码: /** * @Author: Lucif 阅读全文
posted @ 2023-05-04 16:27 俊king 阅读(62) 评论(0) 推荐(0)