• 2022-07-26
    若a,b均是整型变量,正确的switch语句是( )。
    A: switch(a){case 1.0: printf(“i\n”);case 2: printf(“you\n”); ”);}
    B: switch(a){case b: printf(“i\n”);case 1: printf(“you\n”);}
    C: switch(a+b){case 1: printf(“i\n”);case 2*a: printf(“you\n”);}
    D: switch(a+b){case 1: printf(“i\n”);case 2: printf(“you\n”);}
  • 举一反三