Mail Archives: djgpp/1997/11/25/08:18:55

Date: Tue, 25 Nov 1997 08:18:22 -0500 (EST)
Message-Id: <>
From: DJ Delorie <dj AT delorie DOT com>
To: blizzar AT hem1 DOT passagen DOT se
CC: swarnerx3 AT acadia DOT net, djgpp AT delorie DOT com
In-reply-to: <> (message from
Peter Palotas on Tue, 25 Nov 1997 10:42:18 -0500)
Subject: Re: pointers &arrays[]

> >array == &array
> This is NOT true. `&array' is a pointer to array, i.e. a pointer to the
> pointer of the first element in the array.

No, it is true.  Even if they weren't the same, "&array" would be the
right one, since it's a pointer, and "array" isn't a pointer - it's
the whole array, like "int" is all 32-bits of an integer.

Besides, you can try it yourself:

#include <stdio.h>

int foo[10];

  printf("foo=%p &foo=%p\n", foo, &foo);
  return 0;

$ ./array
foo=10000090 &foo=10000090

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019