• 2022-06-17
    #include struct A {int a; char b[10]; double c; }; void f(struct A t); main() {struct A a={1001,"ZhangDa",1098.0};f(a); printf("%d,%s,%6.1f",a.a,a.b,a.c);} void f(struct A t) {t.a=1002; strcpy(t.b,"ChangRong");t.c=1202.0;}
  • 举一反三