cc笔试题公司招聘c笔试题.docVIP

  • 2
  • 0
  • 约2.53万字
  • 约 31页
  • 2019-09-07 发布于上海
  • 举报
改错(5分) void test() { char str[10]; char* str1 = 0123456789; strcpy(str, str1); } 2.改错(5分) void test() { char str[10], str1[10]; for( int = 0; i 10; i++) { str = a; } strcpy(str, str1); } 3.读程序,写出结果(5分) int sum(int a) { int c = 0; static int b = 3; c += 1; b += 2; return (a + b + c); } int main() { int a = 2; for(int i = 0; i 5; i++) { printf(%d,, sum(a)); } return 0; } 4.读程序,写出结果(5分) int main() { int a[3]; a[0] = 0; a[1] = 1; a[2] = 2; int *p, *q; p = a; q = a[2]; int c = a[q - p]; printf(value c = %d\n, c++); printf(value c = %d\n, c); return 0; } 5.读程序,写出结果(10分,选做) #define STRCP

文档评论(0)

1亿VIP精品文档

相关文档