🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2478

Re: What are some tricky C questions?

#2478
From: James Bonfield
Date: Wed, 03 Apr 1996 13:11
20 lines
1140 bytes
In article <4jol5v$1qs@solutions.solon.com> wawda@chaph.usc.edu (Abu Wawda) writes:
>After reading the thread on "Good C interview questions", I've got to
>ask people to post some tricky/trivia questions on programming in C or
>even programming in general. Does anyone have any? Thanks in advance.

How about explaining what following construct does. What can be said about the
values of l and i at the end?

    size_t l;
    int i = MAXINT;

    l = sizeof(++i);

:-)

	James
--
James Bonfield (jkb@mrc-lmb.cam.ac.uk)   Tel: 01223 402499   Fax: 01223 412282
Medical Research Council - Laboratory of Molecular Biology,
Hills Road, Cambridge, CB2 2QH, England.
Technical Details
Message-ID: <4jttdi$3jm@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: <4jol5v$1qs@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: jkb@mrc-lmb.cam.ac.uk (James Bonfield)
Newsgroups: comp.lang.c.moderated
Subject: Re: What are some tricky C questions?
Date: 3 Apr 1996 07:11:14 -0600
Organization: MRC Laboratory of Molecular Biology, Cambridge UK
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4jttdi$3jm@solutions.solon.com>
References: <4jol5v$1qs@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com