Conversion from octal to binary

http://ide.codingblocks.com/#/s/14238
this is my solution to the problem conversion from octal to binary.
Although the code is running correctly for different inputs but the last test case is not getting passed.
Please look into the code and suggest some suitable modifications.

Try for “100”. you will get the answer.