Can't figure out why my C code only works every other time

teknogod02
teknogod02 used Ask the Experts™
on
Hey people
I can't figure out why my code only works with every other input that I put into it. I need it to display all the SNaN and Fractbits and all that stuff every time I put a number into it. Can' you please tell me where my code has gone wrong?
a01p.c
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2014
Top Expert 2015
Commented:
Because the main loop calls scanf "%x" twice,
once from getNextHexInt and once from printNumberData
and printNumberData ignores the value that the main loop got from getNextHexInt,

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial