简答题阅读程序,输出结果。 #include using namespace std; int main() { int a[3][2] = { 1, 2,4, 5 }; int *p; p = a[0]; cout " " " " " " p=a[1]; cout " " " " " " p=a[2]; cout " " " " " " return 0; } A、1 2 4 5 4 5 0 0 0 0 不确定 不确定 B、编译错误 C、1 2 4 5 0 0 0 0 0 0 不确定 不确定 D、1 2 4 5 4 5 0 0 不确定 不确定 不确定 不确定简答题下面程序的运行结果是( ).#include;using namespace std;int main ( ){ float a=1,b=2,c; float *p1=&a,*p2; p2=&b; c= * p1 + *p2; cout A、1 B、2 C、a D、b简答题阅读程序,请输出程序的结果。 #include using namespace std; int main() { int a[]={11,16,13,14,15}; int *ptr = a; cout cout return 0; } A、11 11 B、11 16 C、11 12 D、16 16简答题下面程序的运行结果是( ). #includeusing namespace std;int main( ){int aa[3][3]={{1},{2},{3}},i,*p=&aa[0][0];for(i=0;i A、1 1 B、2 1 C、1 2 D、3 1简答题下列程序运行时的输出结果是( )。 #include using namespace std; int main() {int a[7]={23,15,64,33,40,58}; int s1,s2,*p; s1=s2=a[0]; for(p=a+1;*p;p++) {if(s1>*p) s1=*p; if(s2 cout return 0; } A、23 B、58 C、64 D、79简答题#include using namespace std; int main() { int a[5] = { 1, 2, 3, 4, 5 }; int *ptr = (int*)(&a + 1); cout return 0; } 程序运行结果是什么? A、2 5 B、编译错误 C、1 2 D、2 不确定简答题阅读程序,输出结果 #include using namespace std; int main() { int a[]={11,16,13,14,15}; int *ptr = a; cout return 0; } A、16 16 B、11 11 C、11 16 D、11 12简答题若定义 char s[2][3]={“ab”, “cd”}, *p=(char *)s; //字符型指针p存放的是字符串s的首地址,而字符串s表示的是这样一个字符串: 那么下列表达式语法正确,并且其值与 s[1][1]相等的表达式(并非一定与其等价)是() //根据字符串的表示,s[1][1]是字符‘d’ A、*(s+3) B、p[1][1] C、*(p+3) D、char(*++p+2)简答题阅读程序,输出结果 #include using namespace std; int main() { char *a[] = { "work", "at", "alibaba" }; char **pa = a; pa++; cout return 0; } A、at B、编译错误 C、work D、alibaba简答题下面程序的运行结果是( ). #include using namespace std; void main(void) { int a[5]={10,20,30,40,50}; int *p=&a[0]; p++; cout } A、10 B、21 C、31 D、41简答题阅读程序,请输出程序的结果。 #include using namespace std; int main() { int a[]={11,16,13,14,15}; int *ptr = a; cout cout return 0; } A、11 11 B、11 16 C、11 12 D、16 17简答题如定义 int a[3][4]; 下面哪个不能表示 a[1][1]? A、*(&a[0][0]+5) B、*(*(a+1)+1) C、*(&a[1]+1) D、 *(a[1]+1)简答题阅读程序,输出结果 #include using namespace std; int main() { int a[3][4]={{0,1,2,10},{3,4,5,11},{6,7,8,12}}; cout cout cout cout cout return 0; } A、0 0 3 1 第一行的首地址 B、第一个元素地址 0 3 1 3 C、0 0 3 1 3 D、0 0 3 1 3 1简答题阅读程序,输出结果。 #include using namespace std; int main() { int a[]={11,16,13,14,15}; int *ptr = a; cout cout cout cout return 0; } A、11 11 11 16 B、11 12 11 12 C、11 16 11 16 D、11 16 11 17简答题阅读程序,输出结果。 #include using namespace std; int main() { int a[]={11,16,13,14,15}; int *ptr = a; cout cout cout cout return 0; } A、11 11 11 16 B、11 16 11 16 C、11 11 11 12 D、11 11 12 12简答题以下程序的功能是:将无符号八进制数字构成的字符串转换为十进制整数。例如,输入的字符串为:556,则输出十进制整数366。请在黄色处选择合适的语句。 #include using namespace std; int main() {char *p,s[6]; int n; p=s; cin>>p; n=*p-'0'; while( !='\0') n=n*8+*p-'0'; cout return 0; } A、*++p B、*p++ C、(*p)++ D、*p简答题阅读程序,输出结果。 #include using namespace std; int main() { int a[]={11,16,13,14,15}; int *ptr = a; cout cout cout cout return 0; } A、11 11 11 12 B、11 16 11 16 C、11 12 11 12 D、11 11 11 16简答题已知数组arr的定义如下: int arr[5]={1, 2, 3, 4, 5}; 下列语句中输出结果不是2的是______。A.cout<<*arr+1<<endl;B.cout<<*(arr+1)<<endl;C.cout<<arr[1]<<endl;D.cout<<*arr<<endl;简答题阅读程序,输出结果。 #include using namespace std; int main() { int a[]={11,16,13,14,15}; int *ptr = a; cout cout cout cout return 0; } A、11 11 11 12 B、11 16 11 16 C、11 12 12 12 D、11 12 11 12简答题#include using namespace std; int main() { int a[]={11,16,13,14,15}; int *ptr = a; cout cout cout cout return 0; } A、11 11 11 16 B、11 11 12 12 C、11 12 11 16 D、11 16 11 17
上一页1 / 2下一页