Switch case expression

前端 未结 3 1748
栀梦
栀梦 2021-01-23 08:46

Consider an expression *(1+\"AB\" \"CD\"+1)

What is the solution for this expression ? The above expression is a switch expression in C.

*(2         


        
3条回答
  •  悲哀的现实
    2021-01-23 09:14

    Running your code you'll get answer "Casabance"

    • "AB" "CD" is equal to "ABCD"
    • *("ABCD") points to 'A'
    • *("ABCD" + 0) points to 'A'
    • *("ABCD" + 1) points to 'B'
    • *("ABCD" + 2) points to 'C'
    • 'C' answer is "Casabance"

提交回复
热议问题