Article View: comp.lang.c.moderated
Article #2158Re: Good C Interview questions?
From: Stan Ryckman
Date: Sat, 02 Mar 1996 19:39
Date: Sat, 02 Mar 1996 19:39
31 lines
1528 bytes
1528 bytes
In article <4h777c$5d6@solutions.solon.com>,
Graham Perks <graham_perks_at_bmc-austin@banana.bmc.com> wrote:
:Here's a couple of good C related questions for an interviewer to ask, I
:think (OK for phone interviews too):
:
:1. Can you explain what a makefile is used for?
Ans. To prove that there is no use for C outside of UNIX.
(The GNU coding standard in another thread can also be used as
supporting evidence.)
:2. Tell me about the three parts of a for statement that control the loop.
: (You may need to elaborate on the question a little.)
Ans. They are separated by semicolons.
:3. What is different between a signed int and an unsigned int?
Ans. You use the "subtract" operator ("-") to find out, such as:
#include <stdio.h>
void diff (signed int s, unsigned int u) {
printf( "The difference between a signed int and an unsigned"
" int is %ld\n", (long)s - (long)u);
}
Oh, :-)
Cheers,
Stan.
--
Stan Ryckman (stanr@tiac.net) (new e-mail address)
Technical Details
Message-ID:
<4ha84q$jsf@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailReferences:
<4ec3vg$lst@solutions.solon.com> <4fst9j$2ja@solutions.solon.com> <4gfcvu$2qr@solutions.solon.com> <4h777c$5d6@solutions.solon.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: stanr@tiac.net (Stan Ryckman) Newsgroups: comp.lang.c.moderated Subject: Re: Good C Interview questions? Date: 2 Mar 1996 13:39:06 -0600 Organization: Amber & Sneakers Fan Club Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4ha84q$jsf@solutions.solon.com> References: <4ec3vg$lst@solutions.solon.com> <4fst9j$2ja@solutions.solon.com> <4gfcvu$2qr@solutions.solon.com> <4h777c$5d6@solutions.solon.com> NNTP-Posting-Host: solutions.solon.com