Re: c interview



gkumar007@xxxxxxxxx wrote:

See if these puzzles are of any help to you:
http://www.gowrikumar.com/c/index.html

IMHO, most of these questions are reflective of the silly "gotcha"
questions that often pass as interview questions - not *your* fault,
of course. However, regular readers of comp.lang.c will find a number of
things to nitpick about that you (and many employers) have either
failed to account for or are simply unaware of. To cite possibly the
most obvious example, the return value of malloc() is always cast in
your sample questions; a quick Google search of this group's archives
will reveal that the experts' consensus is that this is a bad idea, an
opinion shared by the FAQ:

http://c-faq.com/malloc/cast.html
http://c-faq.com/malloc/mallocnocast.html

I believe a thorough reading of the FAQ will help you improve both
your quiz and your practical knowledge of C.

--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gmail.com | don't, I need to know. Flames welcome.
.



Relevant Pages

  • Re: onclick only works once
    ... Code containing such a line is unlikely to be correct, but the fault ... will not be found with inadequate testing. ... Read the FAQ; or think. ... Remember that most computing specifications, ...
    (comp.lang.javascript)
  • Re: Crash while scrolling a project
    ... We need to discover whether your project is at fault, ... All actions with this view result in a crash of the .mpp file. ... This shouldn't happen:(I suspect a corrupt file: you could try the ... suggestions in FAQ Item: 43. ...
    (microsoft.public.project)
  • Re: unify pagetable accessors patch causes double fault II
    ... fault on entering user space. ... Bad page state in process 'boot' ... but a reboot is needed ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [PATCH] UDF: possible usage of uninitialized variables
    ... | SuSE CR Labs ... Sorry, that's my fault:( ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [RFT: 2.6 patch] fix text console corruptions
    ... I think that's probably my fault then; ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)