How to determine the result of assigning multi-character char constant to a char variable?

后端 未结 5 483
陌清茗
陌清茗 2020-11-30 14:56

Why a char variable gets \'b\' from assignment of \'ab\', rather \'a\'?

char c = \'ab\';

printf(\"c: %c\\n\", c);

Prints:

         


        
5条回答
提交回复
热议问题