首頁  >  問答  >  主體

函數與結構體

#include <stdio.h>

struct n

{

    int x;

    char c;

# };

 void func(struct n b){

     b.x=20,b.c='y';

}

void main(){

    struct n a={10,'x'};

    func(a);

    printf("%d,%c",a.x,a.c);

###############################################################################. ####}######為什麼這個最後的結果是10,x求大神解###
仰望星空仰望星空1499 天前1098

全部回覆(0)我來回復

無回覆
  • 取消回覆