Checking each bit || Very Simple & Easy to Understand solution
\n\n# Code\n\nclass Solution {\npublic:\n    vector<int> evenOddBit(int n) {\n        int even = 0, odd = 0;\n        for(int i = 0; i < 32; ++i){\n            
\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> evenOddBit(int n) {\n        int even = 0, odd = 0;\n        for(int i = 0; i < 32; ++i){\n            if(n & (1 << i)){\n                if(i%2) odd++;\n                else even++;\n            }\n        }\n        return {even, odd};\n    }\n};\n```
['C++']