for (int y=0;y<(sizeof(a)/sizeof int)y++)
should be as
for (int y=0;y<(sizeof(a)/sizeof (int));y++)
z=a[y]+value(a[y]);
z=a[y]+value(&a[y]);
the value() function calculates no.of 1's in that argument when it is represented as binary , but you are using static variable to count that
finally what is the question for this program?
64.3k questions
77.9k answers
244k comments
80.0k users