Chinaunix首页 | 论坛 | 博客
  • 博客访问: 464716
  • 博文数量: 93
  • 博客积分: 5006
  • 博客等级: 上校
  • 技术积分: 1002
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-30 13:58
文章分类

全部博文(93)

文章存档

2012年(2)

2011年(68)

2010年(23)

分类: C/C++

2011-09-23 08:45:40

#include

int fun1(char *s)
{
    printf("%s*",s);
    return 1;
}

int fun2(char *s)
{
    printf("%s*",s);
    return 0;
}

int main(void)
{
    int rec1,rec2;
    rec1 = (fun1("a")&&fun2("b")||fun1("c")&&fun2("d"));
    rec2 = (fun1("a")&&fun2("b"))||(fun1("c")&&fun2("d"));
    return (rec1 || rec2);
}

panda@panda-pc:~/Code/c$ ./str
a*b*c*d*a*b*c*d*

这个题简单,不知道公司想要考查学生的什么?
阅读(2107) | 评论(6) | 转发(0) |
0

上一篇:shell中的for循环

下一篇:lsof命令

给主人留下些什么吧!~~

sunjiangang-ok2011-09-23 09:04:52

考察的&&与||运算啊,我想应该是这样的。