编程实现: 一组数据中只有一个数字出现了一次。其他所有数字都是成对出现的。 请找出这个数字。(使用位运算) #include <stdio.h> int main(){ int b = 0; int arr[9] = { 0, 0, 2, 2, 3, 3, 4, 4, 1}; for (int i = 0; i < 9; i++){ b = b^arr[i];// 1^1=0 0^0=0 1^0=1,所以单独的数最后就剩下来了 } printf("%d", b); system("pause"); }