运行程序,程序输出结果是( )#include using namespace std;int main(){ struct stud{ char num [5]; int s[4]; double ave;} a;cout
A: 31
B: 32
C: 29
D: 30
A: 31
B: 32
C: 29
D: 30
举一反三
- 下列程序的输出结果第一行是_____,第二行是_______。 #include [iostream] #include [cstring] #include [iomanip] using namespace std; struct student { int num; char name[20]; double score; }; void fun(struct student *s); int main() { struct student stu={12345, "Zhangwei", 98.0}; cout[<stu.num<<","<<stu.name<<","<<stu.score<<endl; fun(&stu); cout<<stu.num<<","<<stu.name<<","<<stu.score<<endl; return 0; } void fun(struct student *s) { s-]num=23456; strcpy(s->name, "Liming"); s->score=88; }
- 以下程序的输出结果是 。 #include<iostream> using namespace std; int main() { int num = 50; int& ref = num; ref = ref + 10; cout <<"num = "<<num<<endl; num = num + 40; cout <<"ref = "<<ref<<endl; return 0; }
- 运行程序,程序输出结果是( )#include using namespace std;int main(){int a[3][3],*p=&a[0][0],i;for(i=0;i A: 345 B: 123 C: 12 D: 234
- 下面的程序输出的结果是( )。 #include <iostream> using namespace std; void main(){ int a=2; int &c=a; a++; cout<<c; } A: 2 B: 3 C: 4 D: *a
- 以下程序运行后的输出结果是_____。#include using namespace std;void main(){ char m; m='B'+32; cout A: B B: C: 66 D: 98