C Programming Code Examples C > Bitwise Operators Code Examples C Program To Identify the Missing Number in an Integer Array of Size N-1 with Numbers[1,N] C Program To Identify the Missing Number in an Integer Array of Size N-1 with Numbers[1,N] #include <stdio.h> #define MAX 15 int missing_number_array(int [],int); int main() { int a[MAX], j, x, n; printf("enter the range of array\n"); scanf("%d", &n); for (x = 0;x < n;x++) { printf("enter a[%d]element into the array:", x); scanf("%d", &a[x]); } j = missing_number_array(a, n); printf("The missing number -> %d\n", j); } /* To find the missing number in array */ int missing_number_array(int a[], int n) { int x; int s1 = 0; int s2 = 0; for (x = 0;x < n;x++) s1 = s1 ^ a[x]; for (x = 1;x <= n + 1;x++) s2 = s2 ^ x; return (s1 ^ s2); }