关于for循环
来源:互联网 发布:软件开发技术风险 编辑:程序博客网 时间:2024/05/01 17:01
测试代码与结果:
root@ubuntu:~/testC/testfor# ./for
i is 0,j is 0
i is 1,j is 1
i is 2,j is 2
i is 3,j is 3
i is 4,j is 4
root@ubuntu:~/testC/testfor# cat for.c
#include<stdio.h>
int main()
{
int i=9;
int j=9;
for(i=0,j=0;i<3,j<5;i++,j++)
{
printf("i is %d,j is %d\n",i,j);
}
return 0;
}
由结果与代码可以看出,for循环中间部分的如果是用逗号隔开的两部分,那么其左边(i<3)是不起作用的,编译时可能会有警告(“left-hand operand of comma has no effect”)
- 关于for循环,while循环
- 关于for循环
- 关于for循环
- 关于双层for循环
- 关于for循环
- 关于for循环
- 关于for循环
- 关于For循环的学习
- 关于for循环的练习
- 关于for循环的嵌套
- 关于增强遍历for循环
- 关于for循环执行顺序
- 问题:关于for index 循环
- 关于FOR循环的一道面试题
- 关于encode_one_macroblock()中的一个for循环
- 关于一段for循环的讨论
- jstl标签使用-- 关于c for 循环
- 关于for循环导致的 ConcurrentModification 异常
- 球迷必备:2012欧洲杯手机观战指南
- NSLog 屏蔽输出 ---define
- IE各项注册表键值说明
- python 安装MySQLdb模块
- Android中处理崩溃异常
- 关于for循环
- php去除html,css,js样式
- Linux tcpdump命令详解
- 注释
- 【转】51单片机串口程序(C语言版)
- lcd
- 【学习点滴-数据结构-二叉树】和为某一值的二叉树路径~
- servlet过滤器
- uniGUI 实操感受