Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ukma.UUCP Path: utzoo!watmath!clyde!cbosgd!ukma!david From: david@ukma.UUCP (David Herron, NPR Lover) Newsgroups: net.lang.c Subject: Re: String help! Message-ID: <929@ukma.UUCP> Date: Wed, 20-Feb-85 17:51:04 EST Article-I.D.: ukma.929 Posted: Wed Feb 20 17:51:04 1985 Date-Received: Fri, 22-Feb-85 09:17:27 EST References: <8257@watarts.UUCP> Organization: Univ. of KY Mathematical Sciences Lines: 17 In article <8257@watarts.UUCP> upen@watarts.UUCP (Ue-Li Pen) writes: > Is it allowed & portable to use the construct: > char* foo(){ > return("foobar"); > } > This would hopefully return a pointer to the string "foobar".. Yes it does....However it is a pointer to a STATIC data area. So it wouldn't be a good idea to change the contents of the string. -- -:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:- -:-David Herron; -:-ARPA-> "ukma!david"@ANL-MCS or david%ukma.uucp@anl-mcs.arpa -:-ARPA-> Or even anlams!ukma!david@ucbvax.arpa -:-UUCP-> {ucbvax,unmvax,boulder,research}!anlams!ukma!david -:-UUCP-> {mcvax!qtlon,vax135,mddc}!qusavx!ukma!david -:-UUCP-> {A-Large-Portion-of-The-World}!cbosgd!ukma!david