更多“#include <iostream> using namespace std; struct student { char name[10]; int score[5”相关的问题
第1题
运行程序,程序运行结果是( )。 #include <iostream> using namespace std; int main() { struct person { char name[9]; int age; }; person a[5]={"John",17,"Paul",19,"Mary",18,"Adam",16}; cout< <a[2].name; return> A、John
点击查看答案
第2题
运行程序,程序运行结果是( ) #include <iostream> using namespace std; int main() { struct date { int year; int month; int day; }; struct s { date birthday; char name[20]; } x[4]={{2008,10,1, "guangzhou"},{2009,12,25,"Tianjin"}}; cout<< x[0].name<<","<> < <endl; return> A、guangzhou,2009
B、guangzhou,2008
C、Tianjin,2008
D、Tianjin,2009
点击查看答案
第3题
若有定义语句int c[5],*p=c;则以下对数组c第1个元素地址的正确引用是( )。
点击查看答案
第4题
运行程序,程序输出结果是( ). #include <iostream> using namespace std; int main() { int fun(char *s); char y[]="abcd"; cout< <fun(y)> < <endl; return 0; } int fun(char *s) { char *t="s;" while (*t) t++;> A、4
点击查看答案
第5题
int a[]={1,2,3,4},y,*p=a;执行语句y=(*++p)- - 后,数组a中的元素的值变为( ).
A、0,1,3,4
B、1,1,3,4
C、1,2,2,4
D、1,2,3,3
点击查看答案
第6题
运行程序,程序输出结果是( ). #include <iostream> using namespace std; int main() { char str[100]="program",*p=str; str[3]=0; cout<
< <endl; return> A、ogram
B、r
C、o
D、pro
</endl;>
点击查看答案
第7题
己知int a[10]={3,7,9,15},*p=a;则不能表示a数组中元素的选项是( ).
点击查看答案
第8题
若有变量定义语句int a[10]={1,2,3,4,5,6,7,8,9,10},*p=a;则数值为6的表达式是( ).
A、*p+6
B、*(p+5)
C、*p+=6
D、p+5
点击查看答案
第9题
运行程序,程序运行结果是( )。 #include <iostream> using namespace std; int main() { static int a[4]={7,8,9},b[4]={4,5,6},c[4],i; for(i=0;i<3;i++) c[i]="a[i]+b[i];"> <<" "; return 0;> A、0
点击查看答案
第10题
己知int a[]={0,2,4,6,8,10},*p=a+1;其值等于0的表达式是( ).
A、*(p++)
B、*(++p)
C、*(p--)
D、*(--p)
点击查看答案