c语言试卷及答案 英文,C语言设计经典英文练习题

《C语言设计经典英文练习题》由会员分享,可在线阅读,更多相关《C语言设计经典英文练习题(12页珍藏版)》请在人人文库网上搜索。

1、C Practice Print 9*9 multiplication table 1*1=1 1*2=2 2*2=4 1*3=3 2*3=6 3*3=9 1*4=4,2*4=8,3*4=12 4*4=16 1*9=9,. 9*9=81#include int main(void)int x,y,z;for(x=1;xintmain()inti;longlongsum=0,jc=1;for(i=1;i=10#include int main()float x,y;printf(Please input X:);scanf(%f,&x);if(xint main()char str100;int。

2、 i=0;int num=0,ch=0,blank=0,other=0;gets(str);while(stri!=0)if(stri=A & stri=a & stri=0 & striint main()int a5=0;int i,j,t;printf(请依次输入5个整数n);for(i=0;i2), write a function to generate and print first n Fibonacci numbers.#include #include int main()int a=1,b=1,sum;int n,i;scanf(%d,&n);printf(%dn%dn,a。

3、,b);for (i=3;i#includeint main()FILE *fp;char ch, 10;printf(输入文件名:n);scanf(%s, );if (fp = fopen(, w) = NULL)printf(errorn);exit(0);for (ch = A; ch = A&ch #includeint main()FILE *fp;char ch, 10;printf(输入文件名:n);scanf(%s, );if (fp = fopen(, w) = NULL)printf(errorn);exit(0);ch = getchar();printf(输入一行字符回。

4、车结束:n);while(ch=getchar()!=n)fputc(ch, fp);putchar(ch);fclose(fp);putchar(10);printf(输入文件名:n);scanf(%s, );if (fp = fopen(e, r) = NULL)printf(errorn);exit(0);char a;if (fp = fopen(, r) = NULL)printf(errorn);exit(0);while (!feof(fp)a = fgetc(fp);putchar(a);fclose(fp);return 0;Input one string from key。

5、board and use pointer to calculate to length of string #include#includeint main()char a20;char *p=a;scanf(%s, a);int i=0;while (*p != 0)p+;i+;printf(%dn, i);return 0;Give one strings and use pointer to copy this string to another.#includeint main()char a20, b20;char *from=a, *to=b;scanf(%s, a);for(;。

6、*from != 0;)*to = *from;from+, to+;*to = 0;printf(%s, b);return 0;Write 1 to 20 to a file, read it and put the sum of these number at the end of file.#include#includeint main()FILE *f;int b20, j, sum = 0;for (j = 0; j #include#define len sizeof(int)int main()int *p10;int a10, i;for (i = 0; i int mai。

7、n()int f(int *p1, int *p2);int g(int *p1, int *p2);int a, b;int *p1, *p2;p1 = &a, p2 = &b;scanf(%d %d, &a, &b);printf(%dn%d, f(p1, p2), g(p1, p2);return 0;int f(int *p1, int *p2)int sum;sum = *p1 + *p2;return sum;int g(int *p1, int *p2)int dif;dif = *p1 - *p2;return dif;Using pointer to read an arra。

8、y of integer and print its elements in reverse order#include int main()int n, c, d, a100, b100;printf(Enter the number of elements in arrayn);scanf(%d, &n);printf(Enter the array elementsn);for (c = 0; c = 0; c-, d+)bd = ac;for (c = 0; c n; c+)ac = bc;printf(Reverse array isn);for (c = 0; c n; c+)pr。

9、intf(%dn, ac);return 0;运算符与表达式: 1.constant 常量 2. variable 变量 3. identify 标识符 4. keywords 关键字 5. sign 符号 6. operator 运算符 7. statement语句 8. syntax 语法 9. expression 表达式 10. initialition 初始化 11. number format 数据格式 12 declaration 说明 13. type conversion 类型转换 14.define 、definition 定义 条件语句: 1.select 选择 2. e。

10、xpression 表达式 3. logical expression 逻辑表达式 4. Relational expression 关系表达式 5.priority优先 6. operation运算 7.structure 结构 循环语句: 1.circle 循环 2. condition 条件 3. variant 变量 4. process过程 5.priority优先 6. operation运算 数组: 1. array 数组 2. reference 引用 3. element 元素 4. address 地址 5. sort 排序 6. character 字符 7. strin。

11、g 字符串 8. application 应用 函数: 1.call 调用 2.return value 返回值 3.function 函数 4. declare 声明 5. parameter 参数 6.static 静态的 7.extern 外部的 指针: 1. pointer 指针 2. argument 参数 3. array 数组 4. declaration 声明 5. represent 表示 6. manipulate 处理 结构体、共用体、链表: 1 structure 结构 2 member成员 3 tag 标记 4 function 函数 5 enumerate 枚举 6。

12、 union 联合(共用体) 7 create 创建 8 insert 插入 9 delete 删除 10 modify 修改 文件: 1、file 文件 2、open 打开 3、close 关闭 4、read 读 5、write 写 6、error 错误 序号 主要章节 常用英汉对照词汇 备注 1 运算符与表达式 ( operator and expression ) 汉语 英语 常量 constant 变量 variable 标识符 identify 关键字 keywords 符号 sign 运算符 operator 语句 statement 语法 syntax 表达式 Expressio。

13、n 初始化 Initialization 数据格式 number format 说明 Declaration 类型转换 type conversion 定义 Define 、 definition 2 条件语句 ( condition statement) 选择 select 表达式 expression 逻辑表达式 logical expression 关系表达式 Relational expression 优先 priority 运算 operation 结构 structure 3 循环语句 (circle statement) 循环 circle 条件 condition 变量 var。

14、iant 过程 process 优先 priority 运算 operation 4 函数 (function) 调用 call 返回值 return value 函数 function 声明 declare 参数 parameter 静态的 static 外部的 extern 5 数组和指针 (array and pointer) 数组 array 引用 reference 元素 element 地址 address 排序 sort 字符 character 字符串 string 应用 application 指针 pointer 参数 argument 数组 array 声明 declaration 表示 represent 处理 manipulate 6 结构体、 共用体 (structures 、 union ) 结构 structure 成员 member 标记 tag 函数 function 枚举 enumerate 联合 ( 共用体 ) union 创建 create 插入 insert 删除 delete 修改 modify 7 文件 ( file) 文件 file 打开 open 关闭 close 读 read 写 write 错误 error。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
强化C语言编程能力的练习题可以包括以下几个方面: 1. 数的输入和输出:这个目要求你编写程序,实现从键盘输入一个整数,然后再输出该整数。[1-第1] 2. 计算表达式的值:这个目要求你编写程序,计算一个表达式的值。例如给定a、b、c三个数,计算(a/b)*c的结果。[1-第2] 3. 字符判断:这个目要求你编写程序,判断一个字符是否为大写字母。如果是大写字母,则输出"Yes",否则输出"No"。[1-第3] 4. 求和运算:这个目要求你编写程序,计算一组特殊数列的和。具体的数列规则可以根据目给出的要求来实现。[1-第4] 5. 硬币翻转游戏:这个目要求你编写程序,模拟一个硬币翻转游戏。根据目给出的要求和规则,计算翻转硬币的结果。[1-第5] 以上是一些常见的强化C语言编程能力的练习题,通过解决这些目,你可以提高自己的编程技能,并加深对C语言的理解。同时,你也可以尝试编写一些更复杂的程序,来挑战自己的编程能力。 <span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [电子学会青少年软件编程(C语言一级)等级考试试卷(2021年6月)-含答案和解思路.pdf](https://download.csdn.net/download/gozhuyinglong/88230811)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [C语言之条件语句强化练习题](https://blog.csdn.net/m0_70469414/article/details/127388140)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [C语言循环语句强化练习题](https://blog.csdn.net/m0_70469414/article/details/127506522)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值