运行下列程序,输出结果是____。#include using namespace std;struct contry { int num; char name[20]; }x[5]={1,"China",2,"USA",3,"France",4,"Englan",5,"Spanish"}; main() { int i; for (i=3;i<5;i++) cout<
查看答案
有以下程序,程序运行后的输出结果是____。#include using namespace std;struct S{ int a,b;}data[2]={10,100,20,200};void main(){ S p=data[1];++(p.a); cout<< p.a;}
有以下程序,程序运行后的输出结果是____。#include using namespace std;struct abc{ char c;float v;};void fun(abc &b){b.c='A';b.v=77.5;}void main(){abc a={'D',90};fun(a);cout<
运行下列程序,输出结果是____。 #include #includeusing namespace std;struct abc{ char str[10];float v;};abc fun(abc x,abc y){if (strcmp(x.str,y.str)>0) return x;else return y;}void main(){abc a={"Zhao",90},b={"Sun",78},c;c=fun(a,b);cout<
运行下列程序,输出结果是____。#include using namespace std;void main(){ union example {struct{int x;int y;}in;int a;int b; }e; e.a=1; e.b=2; e.in.x=e.a*e.b; e.in.y=e.a+e.b; cout<