以下程序的输出结果是#include<stdio.h>int a[3][3]={1,2,3,4,5,6,7,8,9,},*p;main(){ p=(int*)malloc(sizeof(int));f(p,a);printf("%d\n",*p);free(p); }f(int *s, int p[][3]){ *s=p[1][1];}
A.1
B.4
C.7
D.5
A.1
B.4
C.7
D.5
A、2
B、224
C、234
D、4
A.k=6 a=11
B.k=3 a=14
C.k=4 a=12
D.k=5 a=15
A.1 2 5 6
B.5 6 3 4
C.5 6 1 2
D.3 4 5 6
A.1234
B.2344
C.4332
D.1123
1: #include <stdio.h> 2: int main() 3:{ 4: int a=2; 5: int b=6.5 6: for(i=0;i <b;i++) 7: int c="a+sqrt(b);" 8: return 0; 9:} 上述程序在vc2010下的编译结果如下:> ------ Build started: Project: rrrr, Configuration: Debug Win32 ------ > main.cpp > main.cpp(6): warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data > main.cpp(6): error C2143: syntax error : missing ';' before 'for' > main.cpp(6): error C2065: 'i' : undeclared identifier > main.cpp(6): error C2065: 'i' : undeclared identifier > main.cpp(6): error C2065: 'i' : undeclared identifier > main.cpp(7): error C3861: 'sqrt': identifier not found > main.cpp(8): error C2146: syntax error : missing ';' before identifier '; ' > main.cpp(8): error C2065: '; ' : undeclared identifier > main.cpp(8): error C2143: syntax error : missing ';' before '}' ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 引起编译错误的原因是:
A、第五行缺少封号
B、第六行缺少封号
C、第七行有非法字符
D、第七行sqrt缺少头文件
E、第五行变量赋值类型不匹配
#include <stdio.h> #include <stdlib.h> struct contry { int num; char name[20]; } x[5] = {1,"China", 2, "USA", 3, "France", 4, "Englan", 5, "Spanish"}; int main() { int i; for(i=0; i<5; i++) if(strcmp(x[i].name, "t")> 0) printf("%d\n", x[i].num); return 0; }
A、2
B、3
C、1 2 3 4 5
D、1
A.7,2,5,4,3,6,1,
B.1,6,3,4,5,2,7,
C.7,6,5,4,3,2,1,
D.1,7,3,5,6,2,1,
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!