Mail Archives: djgpp/1997/11/25/10:59:10

Date: Tue, 25 Nov 1997 17:58:20 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Peter Palotas <blizzar AT hem1 DOT passagen DOT se>
cc: DJ Delorie <dj AT delorie DOT com>, djgpp AT delorie DOT com
Subject: Re: pointers &arrays[]
In-Reply-To: <>
Message-ID: <Pine.SUN.3.91.971125175627.28212T-100000@is>
MIME-Version: 1.0

On Tue, 25 Nov 1997, Peter Palotas wrote:

> int main(void)
> {
>         strcpy(foo, "987654321");
>         func(foo);
>         return 0;
> }
> $ ./test.exe
> foo = 8c98, &foo = 4c490

This is called "a call by reference": the pointer to foo is pushed onto 
the stack before func is called, and the address you print is the address 
of the copy on the stack.

This thread begins to look like an intermediate C class...

- Raw text -

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