Switch case with logical operator in C

前端 未结 5 1941
借酒劲吻你
借酒劲吻你 2021-01-12 20:59

I am new to C and need help. My code is the following.

 #include  
 #include  
 void main()
 {

  int suite=2;  

  switch(suit         


        
5条回答
  •  轮回少年
    2021-01-12 21:07

    You switch on value 2, which matches default case in switch statement, so it prints "hello" and then the last line prints "I thought somebody".

提交回复
热议问题