for a start long on 32bit machine contains errr 32bit and a byte is 8!!
Second this program simply outputs the number 'num' that was input to being with it should output bValue, then maybe you might see 65535 will become -1 as if by magic you idiot!
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.