print bits of a void pointer

后端 未结 6 2106
[愿得一人]
[愿得一人] 2021-01-23 01:52

If I create a void pointer, and malloc a section of memory to that void pointer, how can I print out the individual bits that I just allocated?

For example:



        
6条回答
  •  心在旅途
    2021-01-23 02:38

    malloc allocates in bytes and not in bits. And whatever it is, your printf is trying to print an address in the memory.

提交回复
热议问题