c_cpp 查找=重复xor具有相同的数字不会更改输出字符。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c_cpp 查找=重复xor具有相同的数字不会更改输出字符。相关的知识,希望对你有一定的参考价值。

int main(void) {
    unsigned char a = 53;
    unsigned char b = 101;
    unsigned char c = 81;
    unsigned char d = 7;
    for(int i = 0; i < 30; i++) {
        a ^= b;
        a ^= c;
        a ^= d;
        printf("a is now %u\n", a);
        /*
         a is now 6
         a is now 53
         a is now 6
         a is now 53
         a is now 6
         a is now 53
         a is now 6
         a is now 53
         a is now 6
         a is now 53
         a is now 6
         a is now 53
         a is now 6
         a is now 53
         a is now 6
         a is now 53
         a is now 6
         a is now 53
         a is now 6
         a is now 53
         a is now 6
         a is now 53
         a is now 6
         a is now 53
         a is now 6
         a is now 53
         a is now 6
         a is now 53
         a is now 6
         a is now 53*/
    }
    return 0;
}

以上是关于c_cpp 查找=重复xor具有相同的数字不会更改输出字符。的主要内容,如果未能解决你的问题,请参考以下文章

c_cpp 最大子阵列总和。在具有最大总和的数组(包含至少一个数字)中查找连续的子数组。

c_cpp 给定已排序的链接列表,删除所有具有重复数字的节点,只留下原始列表中的不同数字。

在 1D NumPy 数组中查找值的索引/位置(具有相同的值)[重复]

如果分辨率更改,则查找相似图像[重复]

在列表中查找单个数字[重复]

VBA - 查找副本并比较其中哪一个最高