gpt4 book ai didi

与字符串指针混淆

转载 作者:太空狗 更新时间:2023-10-29 15:10:55 25 4
gpt4 key购买 nike

<分区>

#include<stdio.h>
int main()
{
switch(*(1+"AB" "CD"+1))
{
case 'A':printf("A is here");
break;
case 'B':printf("B is here");
break;
case 'C':printf("C is here");
break;
case 'D':printf("D is here");
break;
}
}

输出是:C is here.

谁能给我解释一下,这让我很困惑。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com