Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!sdd.hp.com!samsung!munnari.oz.au!csc.anu.oz.au!csc3.anu.oz.au!csc.canberra.edu.au!news From: eyal@echo.canberra.edu.au (Eyal Lebedinsky) Newsgroups: comp.lang.c Subject: Re: Difference between "char *arr" and "char arr[]" Message-ID: <1990Sep25.223020.28665@csc.canberra.edu.au> Date: 25 Sep 90 22:30:20 GMT References: <8103@aggie.ucdavis.edu> <26680@mimsy.umd.edu> Sender: news@csc.canberra.edu.au Organization: none Lines: 12 Following the discussion, I feel that two issues are beeing mixed: 1 - an object is either an array OR a pointer with no ambiguity. 2 - a reference to an object can mix array/pointer notation. If an object is declared/defined so as to lead the compiler to see it as an array then all references will follow this notion, same with pointer. So: a[4] can be used to refer to 'a' (regardless if 'a' is arr/point) and the appropriate code will be emitted depending on THE TYPE of a. '*(a+4)' will do the same. The C syntax/semantics defines this clearly. -- Regards Eyal