1 votes 1 votes { int i ; int power_of_ten[5] = {00001,00010,00100,01000}; for(i=0;i<4;++i) printf("%d",power_of_ten[i]); } a.1 4 8 16 b. 1 8 64 512 c.compilation error d.none of the above Programming in C programming-in-c + – nish kim asked Sep 2, 2017 nish kim 1.1k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 3 votes 3 votes When we prefix a '0' before a number in C program , this means the number is in octal representation..And for hexadecimal representation we prefix by '0x'.. Hence on printing the decimal equivalent of 00001 , we will get 80 = 1.. on printing the decimal equivalent of 00010 , we get 81 = 8 and so on for the remaining numbers too.. Hence B) should be the correct answer.. Habibkhan answered Sep 2, 2017 • selected Sep 3, 2017 by Habibkhan Habibkhan comment Share Follow See 1 comment See all 1 1 comment reply nish kim commented Sep 2, 2017 reply Follow Share Thanks 1 votes 1 votes Please log in or register to add a comment.