This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sending Binary Data with "printf"

Hi..


I want to send Binary Data using printf() function

for examle if I do

 printf("%d",i)
where i=16706 then printf() function transmit that integer in text mode (not in Binary mode) i.e. it will send 5 bytes for 16706.
If I use %X instead of %d even then it will send 4142 in HEX....that means 4 bytes.

Now if somhow I can send the number 16706 in binary .... it will become 0xAB which is only two bytes .

so for any integer upto 65636.... I can send it as binary in only two bytes..

I f somone knows...pls let me know.


Thanks....

0