[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: C's pointer arithmetic (Was Re: Setting effective UID for a shell script)

On Thu, May 16, 2002 at 09:02:25AM +0200, Perceval Anichini wrote:
> When you write
>  argv + 1, the compiler will understand : compute the address
> of argv, and add one time the size of the type which is pointed by argv.
> I remember to you that argv[1] = argv + 1. Brackets are only syntactic
> sugar, which allows us not seeing we are dealing with pointer arithmetic.

This could hardly be more offtopic, but

	argv [1] == *(argv + 1)

not (argv + 1).  &(argv [2]), or argv + 2, would have been what the
original coder was trying to express.



To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: