现在的位置: 首页 > 综合 > 正文

你的C真的学好了么?

2012年03月22日 ⁄ 综合 ⁄ 共 609字 ⁄ 字号 评论关闭
水木社区上的一个兄弟找到的这个网页(http://www.gowrikumar.com/c/index.html),如果你自以为C学的够好了,那做一下这上面的题检验一下吧。

我没做几道,但下面这道题真让我……,找到答案时我禁不住“O...M...G...”了一声。

#include<stdio.h>
  
int main()
  
{
          
int a=10;
          
switch(a)
          
{
                  
case '1':
                      printf(
"ONE\n");
                      
break;
                  
case '2':
                      printf(
"TWO\n");
                      
break;
                  defa1ut:
                      printf(
"NONE\n");
          }

          
return 0;
  }


If you expect the output of the above program to be NONE, I would request you to check it 
out!!

提示

抱歉!评论已关闭.