gpt4 book ai didi

c - 以上是有效的 C 代码吗?如果是这样,它试图达到什么目的,为什么有人会做上面那样的事情?

转载 作者:行者123 更新时间:2023-12-02 05:45:06 25 4
gpt4 key购买 nike

<分区>

Possible Duplicates:
What does this C code do [Duff's device]?
How does Duff's device work?

void duff(register char *to, register char *from, register int count)
{
register int n=(count+7)/8;
switch(count%8)
{
case 0:
do{
*to++ = *from++;

case 7: *to++ = *from++;
case 6: *to++ = *from++;
case 5: *to++ = *from++;
case 4: *to++ = *from++;
case 3: *to++ = *from++;
case 2: *to++ = *from++;
case 1: *to++ = *from++;
}while( --n >0);
}
}

上面的 C 代码是有效的吗?如果是这样,它试图达到什么目的,为什么会有人做上面那样的事情?

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