Easy Solution in C .
IntuitionApproachComplexity
Time complexity: O(n) .

Space complexity: O(n) .
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity: O(n) .
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(n) .
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```c []
int* evenOddBit(int n, int* returnSize) {
    int* arr = (int*)calloc(2, sizeof(int));
    int* barr = (int*)calloc(10000, sizeof(int));
    int index = 0;
    int evencount = 0;
    int oddcount = 0;
    while (n != 0) {
        if (n % 2 == 0) {
            barr[index++] = 0;
            n /= 2;
        }
        if (n % 2 == 1) {
            barr[index++] = 1;
            if ((index - 1) % 2 == 0) {
                evencount++;
            } else {
                oddcount++;
            }
            n /= 2;
        }
    }
    arr[0] = evencount;
    arr[1] = oddcount;
    free(barr);
    *returnSize = 2;
    return arr;
}
```
['C']