C语言-2010-华为-网络面试题汇总-2.docVIP

  • 6
  • 0
  • 约2.17万字
  • 约 30页
  • 2019-06-02 发布于浙江
  • 举报
C语言面试题精选 学号:2009121041 姓名:曹颖璐 本题出自:华为C语言面试题 题目:请写出下列代码的输出内容 #include stdio.h int main() {   int a,b,c,d;   a = 10;   b = a++;   c = ++a;   d = 10 * a++;   printf(b,c,d:%d,%d,%d,b,c,d);   return 0; } 答:10,12,120 学号:2009121042 姓名:丁婷 本题出自:雪花啤酒有限公司 题目:将一个字符串“hello,world”逆序输出。 答案: #includestdio.h #include string.h int main() { char str[] = hello,world; int len = strlen(str); char t; for (int i = 0; i len / 2; i++) { t = str[i]; str[i] = str[len-i-1]; str[len-i-1] = t; } printf(%s, str); return 0; } 学号:2

文档评论(0)

1亿VIP精品文档

相关文档