Help me with my code where im wrong
Hello
Problem lies in your code at this statement:
arr[i] = arr[i] + (a)&(1);
This statement is causing error most probably because it returns a bool value and is in return typecasting arr[i] when add operation is performed.
Change this to:
if(a&1)
arr[i]++;