Re: Really **wonderful** website for C interview questions!!!!!



> From: rajanarayan2005@xxxxxxxxx
> http://www.cracktheinterview.com

I saw your article just tonight and took a look at that Web site. What
I like is that the answers are technically correct. For example, given
only a pointer to a single node in a singly-linked list, how do you
delete that one node? You can't! But you can fake it by deleting the
next element after it and moving the data from it to the original node,
but technically you haven't deleted the node so that's not a valid to
the question as stated. But it's close enough. But what if the node is
the last, then you can't even do that. But if there's a convention for
marking "ignore" nodes, you can do that. Indeed except for those subtle
points he got the answer pretty correct, better than I expected.

What I don't like about the site is that code examples are given as
arbitrarily large unstructured programs, instead of a series of small
tools built bottom up with the topmost tool being a simple and easy to
understand application of the lower-level tools. His multi-page code
for printf was the clincher in my mind. It didn't even deal with
floating point. Imagine if the *entire* specification of printf were
implemented in his style, something like fourty pages of code all in a
single illegible mega-function. He needs to learn structured
programming, and apply it in his code examples.

Also I don't see it reasonable to treat his Web site as true FAQs,
whereby somebody not knowing anything about C, wishing to fake an
interview, crams for the exam. Some of the answers are decent
conceptual points, but others are just huge meaningless batches of code
that nobody could possibly memorize (without understanding) to recite
at an interview. On the other hand, if the code were properly
structured, somebody might actually be able to understand the examples
and learn something from them.

Would anybody pay me to re-do the Web site to have nicely structured
code examples, and then to write a CAI program that actually teaches
novices everything there? By the way, most of the questions have almost
nothing to do with C, they are general questions about various kinds of
data structures (mostly linked lists) and have equal applicability in C
or LISP or other language where one wishes to implement or use linked
lists. I think virtually all the examples would be better written as
general programming algorithm questions agnostic as to the specific
programming language to be used. The ones that ask the applicant to
implement a known C library function can be broken into thre parts:
(1) What is the API specification for the particular named C-library
function, (2) Given the following abstract specification for a function
definition, what algorithm would implement it, (3) Given the following
pseudo-code algorithm, how might you code it in a particular language,
such as C. If I were the interviewer, I'd pick some function that was
*not* in the standard library for that language, but *is* in the
standard library for some other language, explain the API for it to the
job applicant so I was sure he knew what interface was needed, and ask
both what algorithm to use and how that algorithm would be implemented
in this language to match what the other language already provided.
(No, I would not go the other way, asking how a library function in
this language would be implemented in some other hypothetical
language.)
.



Relevant Pages

  • Re: Computer Programming Career
    ... a great image-recognition algorithm won't be ... >> evidence I offer the vast stretches of extant crap C code publically ... This problem is not limited to C, of course, but that's the language ... Arithmetic is a fundamental programming concept. ...
    (comp.programming)
  • Re: Computer Programming Career
    ... and not in choice of algorithm. ... C programmers who have used the language for *years* ... Indirection is a fundamental programming concept. ... Well a book called "Graphics Gems" was published and people in the computer ...
    (comp.programming)
  • Re: Code Complete: 1st or 2nd Edition?
    ... So here is the author dissin' my language, ... common programming issues, I believe them, or at least stay open minded. ... My electronics engineering consulting site: http://www.moorecad.com ISO 7185 Standard Pascal web site: http://www.moorecad.com/standardpascal Classic Basic Games web site: http://www.moorecad.com/classicbasic The IP Pascal web site, a high performance, highly portable ISO 7185 Pascal compiler system: http://www.moorecad.com/ippas ...
    (comp.programming)
  • Re: Algorithms
    ... My attempt at creating a working Java program out of the algorithm on ... knowledge of the language is very limited so when I see a question ... When you say "...the basics of programming" I certainly hope you are ...
    (comp.lang.java.help)
  • Re: How long to learn C++ if fluent in Java?
    ... It depends on what you call "learning a language". ... I had done a lot of programming in BASIC. ... compilation errors and segmentation fault:core dumped s. ... If you can devise the algorithm also, such that it suits that particular ...
    (comp.lang.cpp)