Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: C Programming Tutorial on Youtube Date: Thu, 13 Oct 2016 08:31:22 -0700 Organization: None to speak of Lines: 26 Message-ID: References: <8be0cdbe-c2f4-42ec-b6a7-e9a154981718@googlegroups.com> <87shs18l6f.fsf@bsb.me.uk> <871szk8n9o.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="2f0e64d192bea43a8327a03587074a79"; logging-data="15552"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19WnkHjsijnxAqaL2JOWbEF" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:vZZX24BgPIZ3dNDW8NePCg7mbkY= sha1:Vuh5Idiu2aR1rOKKnd/K+wh7MJ8= Xref: csiph.com comp.lang.c:94827 Ben Bacarisse writes: > Malcolm McLean writes: [...] >> char buff[1024]; [...] >> buff is a constant character pointer, except for the odd little >> quirk which is mainly undesireable in real code anyway. > > No it isn't is constant character pointer. It is an expression with > array type that is not an lvalue. What do you mean it's not an lvalue? "buff" is the name of an array object. When used as an expression (a primary-expression), it certainly is an lvalue; it designates an object. Like any expression of array type, it may or may not be "converted" ("adjusted" would have been clearer) to an expression of pointer type, which is not an lvalue. [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"