delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/01/16:05:05

Date: Sun, 1 Mar 98 22:54:30 PST
From: Noam Rotem <nrotem AT johnbryce DOT co DOT il>
Subject: Addresses of arrays
To: djgpp AT delorie DOT com
Cc: Nir Pardo <nirp AT inter DOT net DOT il>
Message-ID: <Chameleon.980301230048.nrotem@netvision.netvision>
MIME-Version: 1.0

I try and try and try, and can't understand how come the address of an array is the same 
as the address of the first cell of it.

int Arr[SIZE];
if (Arr==&Arr) printf("Well, I give up...");

I always thought the name of an array to act as a pointer to the first value. Am I wrong 
somehow?

Does this mean I can use scanf("%s",&Str)?

---------------------------------------------
Noam Rotem
John Bryce Training Centre
Tel Aviv, Israel.
03-7535803
=============================================
1. Take upon yourself an impossible mission.
2. Accomplish the mission.
3. Go back to step 1.

It's the only sane answer to modern life.

---
01/03/98
22:54:30

- Raw text -


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