Path: csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: Christmas Quiz 2022 Date: Sun, 18 Dec 2022 17:18:02 -0800 Organization: A noiseless patient Spider Lines: 13 Message-ID: <861qow2nud.fsf@linuxsc.com> References: <354067d8-9199-4090-b6c5-68910515d642n@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader01.eternal-september.org; posting-host="ff406b04d09b824d6c1109f51ef0323b"; logging-data="102999"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+n2Wl8TO51H4in1xoU8MU6vUcKaZ4wpAo=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:IxnIE0KR4743RAw4qDCnDWFFqJc= sha1:iCSGxxoZ36rt2z1uP3Tp0uDEs58= Xref: csiph.com comp.lang.c:168588 Tony Oliver writes: > On Sunday, 18 December 2022 at 20:22:16 UTC, Roman P wrote: > >> 3) What happens when you overflow an int variable, that is, set >> it to a value beyond its range? > > Undefined Behaviour. In the normal case, and most likely what is being asked about, not undefined behavior, but implementation-defined behavior, or (from C99 on) raise an implementation-defined signal.