Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: relearning C: why does an in-place change to a char* segfault? Date: Tue, 13 Aug 2024 17:46:05 -0700 Organization: A noiseless patient Spider Lines: 8 Message-ID: <864j7oszhu.fsf@linuxsc.com> References: <87jzh0gdru.fsf@nosuchdomain.example.com> <20240801174256.890@kylheku.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Wed, 14 Aug 2024 02:46:06 +0200 (CEST) Injection-Info: dont-email.me; posting-host="088cfa383a3af87f6acebe452dc28057"; logging-data="158184"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CRkiWSx7qzQXp5Rbi0pdqfmQiP4+mVxY=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:E+3fN5W2Sw7+Kc8F/TVuu4BwGsc= sha1:eaWd49bTetqOd/YbBk5vmh0yGns= Bytes: 1550 James Kuyper writes: > Just as 1 is an integer literal whose value cannot be modified, > [...] The C language doesn't have integer literals. C has string literals, and compound literals, and it has integer constants. But C does not have integer literals.