Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: C String terminator Date: Sat, 22 Feb 2020 09:05:21 -0800 Organization: None to speak of Lines: 21 Message-ID: <87blpqa6y6.fsf@nosuchdomain.example.com> References: <87muaodqqn.fsf@bsb.me.uk> <87zhencyud.fsf@bsb.me.uk> <1by2u7s456.fsf@pfeifferfamily.net> <87o8v3cg0i.fsf@bsb.me.uk> <877e1rc6f7.fsf@bsb.me.uk> <87v9p9bylk.fsf@bsb.me.uk> <861rrtj9hx.fsf@linuxsc.com> <87d0bc8xf6.fsf@nosuchdomain.example.com> <861rquhlqk.fsf@linuxsc.com> <87wo8m9nm4.fsf@nosuchdomain.example.com> <86imjyd2hl.fsf@linuxsc.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="20b58c07d71e5b95782f89587293237c"; logging-data="4227"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19jd/mcLiVf73g0bjQI/T50" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cancel-Lock: sha1:uV7HuxMDBrH1t+2LVh4prefY2KI= sha1:eeSiF6H3lBtme+55W22yLW4zLtA= Xref: csiph.com comp.lang.c:150153 Tim Rentsch writes: [...] >>> Keith Thompson writes: >> [...] >> >>>> A pointer to a string *is* required for a "%s" directive, but the >>>> standard says so only indirectly. [...] > I need to add though that 'char' is not really accurate. The Standard > says "character type" and I think it means that, not just 'char'. > Furthermore if an 'l' length modifier is present then the array > elements are assumed to be of type 'wchar_t'. Both the regular > character types and wchar_t fall under the common umbrella of > "character type". When I wrote "%s" directive, I meant "%s" directive. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */