0 votes 0 votes Programming in C made-easy-test-series programming-in-c programming + – Vaishnavi01 asked Dec 7, 2018 • edited Mar 14, 2019 by adeebafatima1 Vaishnavi01 985 views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Jaideep Bankoti commented Dec 7, 2018 reply Follow Share There are two mistakes in this program excluding the sizeof typo, one the braces after main and other passing a[y] without reference. Answer would be compile time error 0 votes 0 votes Vaishnavi01 commented Dec 7, 2018 reply Follow Share Made easy has given the solution 11 0 votes 0 votes Jaideep Bankoti commented Dec 7, 2018 reply Follow Share If the program would have been right , the answer would be 11, or 4 (this is what my program run is showing ) but anyways I will tell you how they computed 0 votes 0 votes Vaishnavi01 commented Dec 7, 2018 reply Follow Share Yes please, show the evaluation I am not able to understand this. 0 votes 0 votes Jaideep Bankoti commented Dec 7, 2018 reply Follow Share Here is a rough draft, 0 votes 0 votes Jaideep Bankoti commented Dec 7, 2018 reply Follow Share check this out i wrote the program with few corrections, but it prints 5, you can run it online here, it returns the final value of count as 1 which adds with 4 in main() , i think it is not recognizing static for count. https://onlinegdb.com/S1dNCGOJ4 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes Answer Will Be 11. In the Value program the count will be incremented depends on the number of one present in the binary representation of the X passed to the value function. And the final answer of the z depends on the last value in the array + the count all the number present in the array. pradeepchaudhary answered Dec 7, 2018 pradeepchaudhary comment Share Follow See all 0 reply Please log in or register to add a comment.