Re: integer to characters
From: Default User (first.last_at_boeing.com.invalid)
Date: 10/23/03
- Next message: Barry Schwarz: "Re: finding closest y value to zero and its corresponding x value"
- Previous message: Mike Wahler: "Re: integer to characters"
- In reply to: Gene Wirchenko: "Re: integer to characters"
- Next in thread: Gene Wirchenko: "Re: integer to characters"
- Reply: Gene Wirchenko: "Re: integer to characters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 22 Oct 2003 23:40:52 GMT
Gene Wirchenko wrote:
>
> On Wed, 22 Oct 2003 22:38:24 GMT, Martin Ambuhl
> <mambuhl@earthlink.net> wrote:
>
> [snip]
>
> >int main(void)
> >{
> > int x[3] = { 123, 23, 3 };
> > char buf[BUFSIZ], *p;
> > size_t i;
> > for (i = 0; i < sizeof x / sizeof *x; i++) {
> ^^^^^^^^^
> What does this mean? I can not help but read it as the size of
> an int * *. I would have written "sizeof(int)".
How would you get a pointer to pointer from applying the dereferencing
operator to a pointer?
> Please explain as I am missing something if this is real code.
Yes, that divides the size of an entire array but the size of one
element, giving the number of elements in the array. Only works with
real arrays.
Brian Rodenborn
- Next message: Barry Schwarz: "Re: finding closest y value to zero and its corresponding x value"
- Previous message: Mike Wahler: "Re: integer to characters"
- In reply to: Gene Wirchenko: "Re: integer to characters"
- Next in thread: Gene Wirchenko: "Re: integer to characters"
- Reply: Gene Wirchenko: "Re: integer to characters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|