Re: printf
- From: Pietro Cerutti <gahr@xxxxxxx>
- Date: Tue, 31 Jul 2007 12:12:30 +0200
Shane wrote:
Pietro Cerutti wrote:
Shane wrote:
Barry Schwarz wrote:If you know the length of the array, you may want to print each element
On Tue, 31 Jul 2007 14:33:29 +1200, Shane <shane@xxxxxxxxxxxxxxxxxxxx>Void
wrote:
Hi all, I am learning C, and I have a problem with printf.What is the exact type of the pointer?
I have a pointer that points to binary data, and I want to print that
data
out. If I cast the pointer to (char *) then the data is printed out in
the UniCode(?) equivalent of the data.
If I try to cast to (int *) then I only get the address of the pointer
(I
think). What I really want is all the ones and zeros to be printed
out.
"Binary data" is term that hasBinary data, 1's and 0's
had several different meanings in various posts. What does the
pointer really point to?
I can interpret the data, if I can read it.
Give a short example if possible.1111 1010 1100 1110
(byte) of the array as an hex value.
Awesome, thats what I can do.
How do I find the length of the array?
You can't. You have to keep track of it since the beginning (i.e. while
storing data in it).
--
Pietro Cerutti
PGP Public Key:
http://gahr.ch/pgp
.
- References:
- printf
- From: Shane
- Re: printf
- From: Barry Schwarz
- Re: printf
- From: Shane
- Re: printf
- From: Pietro Cerutti
- Re: printf
- From: Shane
- printf
- Prev by Date: Re: Staic array de allocation
- Next by Date: Re: Staic array de allocation
- Previous by thread: Re: printf
- Next by thread: Re: printf
- Index(es):
Relevant Pages
|