• 手机版
  • 热门标签
  • 站点地图
  • 我要投稿
  • 广告合作
  • 联系我们
编程之家
AI导航网
  • 广告位招租
  • 广告位招租
  • 首页
  • 编程教程
  • 编程导航
  • 编程百科
  • 编程博文
  • 编程实例
  • 常见问题
  • 产品运营
  • 软件教程
  • 办公软件
  • ▸ php实例代码
  • ▸ Javascript实例代码
  • ▸ python实例代码
  • ▸ Shell实例代码
  • ▸ Sql实例代码
  • ▸ 正则表达式实例代码
  • ▸ Python函数
  • ▸ Java实例代码
  • ▸ C#实例代码
  • ▸ C语言实例代码
  • ▸ C++实例代码
  • ▸ Erlang实例代码
  • ▸ Dart实例代码
  • ▸ D3.js实例代码
  • ▸ D语言实例代码
  • ▸ CSS实例代码
  • ▸ Cobol实例代码
  • ▸ Clojure实例代码
  • ▸ Bootstrap实例代码
  • ▸ Vue实例代码
  • ▸ Angular实例代码
  • ▸ 汇编语言实例
微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!
  • 编程之家
  • C语言实例代码
使用putchar()函数输出字符
#include <stdio.h> int main( void ) { int count; for (count = 14; count < 128; ) putchar(count++);
使用putchar()显示字符串
#include <stdio.h> #define MAXSTRING 80 int main( void ){ char message[] = "this is a test";
使用puts()输出字符串数组
#include <stdio.h> int main( void ){ char *messages[5] = { "This", "is", "from", "yiibai", ".com." };
for循环和字符输出,以下程序执行什么操作?
#include <stdio.h> int main(void) { int ctr; for( ctr = 65; ctr < 91; ctr++ ) printf("%c", ctr );
将输入复制到输出
// 输入 int ch; ch = getchar(); while(ch != EOF) { putchar(ch); ch = getchar(); } // 输出 int ch; while((ch = getchar()) != EOF)
计算输入中的字符数
使用for循环: double count; for(count = 0; getchar() != EOF; ++count) ;/* null statement */ printf("%.0f\\n", count);
计算输入的行数
int ch, count = 0; while((ch = getchar()) != EOF) if(ch == '\\n') ++count; printf("%d\\n", count);
对在终端输入的单个字符进行分类
#include <stdio.h> int main (void) { char c; printf ("Enter a single character:\\n"); scanf ("%c", &c);
在行和列中打印字符
#include <stdio.h> void display(char cr, int lines, int width); int main(void) { int ch; int rows, cols;/* number of rows and columns*/
计算字符,单词,行数
#include <stdio.h> #include <ctype.h>// for isspace() #include <stdbool.h>// for bool, true, false
创建一个包含26个元素的数组,并在其中存储26个小写字母
#include <stdio.h> #define SIZE 26 int main( void ) { char lcase[SIZE]; int i; for (i = 0; i < SIZE; i++)
输入ASCII代码值,例如66,然后输出具有该ASCII代码的字符
#include <stdio.h> int main(void) { int ascii; printf("Enter an ASCII code: "); scanf("%d", &ascii);
在printf函数中转义序列
#include <stdio.h> int main(void){ float salary; printf("\\aEnter your desired monthly salary:");/* 1 */
将换行符和制表符等字符转换为可见的转义序列,如\n和\t
#include <stdio.h> #define MAXLINE 1000 int getchars(char line[], int maxline); void escape(char s[], char t[]);
使用条件表达式将大写字母转换为小写字母
#include <stdio.h> int lower(int c); int main(void){ char s[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
将输入每行一个字词打印
#include <stdio.h> int main(void){ int c = 0, linestarted = 0; printf("Input some characters, then press Ctrl+D.\\n");
上一页1314151617181920下一页
  • • 一次彻底讲清如何处理mysql 的死锁问题
  • • MySQL 通过 Next-Key Locking 技术(行
  • • 一文彻底弄懂mysql的事务日志,undo lo
  • • Linux系统控制文件 /etc/sysctl.conf详
  • • linux命令useradd添加用户详解
  • • vi 和vim 的区别
  • • Linux系统下如何监测磁盘的使用空间
  • • linux中查看和开放端口
  • • Linux设置开放一个端口
  • • linux之ftp命令详解
  • • linux系统下实时监控进程以及定位杀死挂
  • • Linux下安装jdk8的方法
  • • 阿里云被挖矿进程wnTKYg入侵的解决方法
  • • 莫小安 CentOS7使用firewalld打开关闭防
  • • Linux中more和less命令用法
  • • linux系统里/opt目录和/usr/local目录的
  • • 如何使用Siege进行压测?
  • • 本地访问服务器的nacos地址
app电脑安卓go工具小米华为微信iphonewi-fiwindows设备管理器主板苹果美团堆安卓手机显示器显卡phpappleandroid为什么路由器路由传感器京东金融微信小程序支付宝微信公众号循环并发区别硬盘td医保怎么买kingston华为手机
  • 友情链接:
  • 编程之家
  • -
  • 我要投稿
  • -
  • 广告合作
  • -
  • 联系我们
  • -
  • 免责声明
  • -
  • 网站地图
版权所有 © 2018编程之家闽ICP备13020303号-8
微信公众号搜索 “ 程序精选 ” ,选择关注!
微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!