c interview

Discussion in 'C Programming' started by dis_is_eagle@yahoo.com, Aug 1, 2006.

  1. Guest

    hi....i am preparing for interview...where can i get helpful c
    interview questions and tips...also,can anybody provide me with a soft
    copy of the c-faq book...thanx and regards..

    eric
     
    , Aug 1, 2006
    #1
    1. Advertising

  2. writes:
    > hi....i am preparing for interview...where can i get helpful c
    > interview questions and tips...also,can anybody provide me with a soft
    > copy of the c-faq book...thanx and regards..


    <http://www.c-faq.com/>

    I'm not sure whether it contains everything that's in the book.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Aug 1, 2006
    #2
    1. Advertising

  3. Guest

    Hi eric,
    wrote:
    > hi....i am preparing for interview...where can i get helpful c
    > interview questions and tips...

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

    Regards,
    Gowri Kumar
     
    , Aug 1, 2006
    #3
  4. 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.
     
    Christopher Benson-Manica, Aug 2, 2006
    #4
  5. Guest

    Hi Benson,
    Glad to see your reply.

    > 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.

    Firstly, I'm not an expert in C programming and I'm still learning.
    It's an effort I'm making to share the little knowledge I have gained
    with others and also to learn more in the process
    I would be grateful, if you/anyone here can point out all the mistakes
    and provide the suggestions to make it better.

    > 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 would modify the sources appropriately.

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

    Thanks for the suggestion. I will do that soon.

    Also, if anyone has else has feedback on the questions, please feel
    free to send them across to me.

    Have a terrific day!!!

    Regards,
    Gowri Kumar
     
    , Aug 2, 2006
    #5
  6. Christopher Benson-Manica wrote:
    > 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;


    To be fair though, in one of them at least that's part of the point of
    the example - the lack of a proper declaration of malloc() is the cause
    of the problem, and the cast hides it (sometimes). It is a shame that
    having started off with a good example of why it's bad to cast
    malloc(), the rest of the examples do so!

    The site reminds me of a classic FAQ list I came across once; answers
    and explanations would be helpful.
     
    J. J. Farrell, Aug 2, 2006
    #6
  7. Guest

    hi GK...u rocks...ur questions too!!!....thanx for the materials...i am
    also learning c and found ur reference to be very interesting....hav u
    got ny soft-copy of the book programming pearls...i would like to hav
    it....bye..regards...eric
     
    , Aug 2, 2006
    #7
  8. Sjouke Burry Guest

    wrote:
    > hi GK...u rocks...ur questions too!!!....thanx for the materials...i am
    > also learning c and found ur reference to be very interesting....hav u
    > got ny soft-copy of the book programming pearls...i would like to hav
    > it....bye..regards...eric
    >

    Well boy, keep emitting this shitty language and
    I am sure you will join the dole.
     
    Sjouke Burry, Aug 2, 2006
    #8
  9. writes:
    > hi GK...u rocks...ur questions too!!!....thanx for the materials...i am
    > also learning c and found ur reference to be very interesting....hav u
    > got ny soft-copy of the book programming pearls...i would like to hav
    > it....bye..regards...eric


    *Please* don't use silly abbreviations when you post here. Take the
    time to spell out words: "you", "your", "have", "any", etc.
    Capitalize the word "I" and the first word of each sentence. A
    sentence ends with a single ".", not an ellipsis "...".

    We're here to communicate. If you're not interested in doing so, try
    somewhere else.

    I'm familiar with the book "Programming Pearls". As far as I know,
    there is no legally obtainable soft copy (and we will not help you
    obtain an illegal one).

    A good introduction to this newsgroup is at
    <http://clc-wiki.net/wiki/Introduction_to_comp.lang.c>.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Aug 2, 2006
    #9
  10. Guest

    , Aug 2, 2006
    #10
  11. jaysome Guest

    On 1 Aug 2006 00:20:30 -0700, wrote:

    >hi....i am preparing for interview...where can i get helpful c
    >interview questions and tips


    I don't necessarily know about any helpful C interview questions and
    tips I can help you with, but for what it's worth, here's the
    transcript of the start of an interview I could envision with someone
    (denoted by "I", for the Interviewee):

    Me: What you see on the white board is a sentence written with
    improper capitalization and grammar ("i am preparing for interview.").
    Go up there and write in the corrected sentence just below it.

    I: That question has nothing to do with "C". Can you ask me a question
    about "C"? ... sir? ... after all, I've prepared well to answer
    questions about "C" ... sir ... isn't that what you want? ... sir? ...
    please ... sir ... help me.

    Me: Thank you Mr. I. Lilly is now here to escort you out the door.

    >...also,can anybody provide me with a soft
    >copy of the c-faq book...thanx and regards..


    I hope the soft copy never comes out. Buy the hard copy. It was the
    best money I ever spent, and your mileage shouldn't vary.

    --
    jay
     
    jaysome, Aug 2, 2006
    #11
  12. said:

    > Hi Benson,
    >> > http://c-faq.com/malloc/cast.html
    >> > http://c-faq.com/malloc/mallocnocast.html

    >> I would modify the sources appropriately.

    > Done.
    > I have modified the sources (except one) using malloc to not to cast.
    >
    > Anything else needs to be corrected?


    Yes. I'll get back to you when I have more time - hopefully later today. If
    I haven't replied by, say, six hours from the time this arrives on your
    server, reply to this message.

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at above domain (but drop the www, obviously)
     
    Richard Heathfield, Aug 2, 2006
    #12
  13. Guest

    On 2006-08-02, <> wrote:
    > Hi Benson,
    >> > http://c-faq.com/malloc/cast.html
    >> > http://c-faq.com/malloc/mallocnocast.html

    >> I would modify the sources appropriately.

    > Done.
    > I have modified the sources (except one) using malloc to not to cast.
    >
    > Anything else needs to be corrected?
    >


    I've lost the original message. Could you repost the link?

    --
    Andrew Poelstra <http://www.wpsoftware.net/projects>
    To reach me by email, use `apoelstra' at the above domain.
    "Do BOTH ends of the cable need to be plugged in?" -Anon.
     
    , Aug 2, 2006
    #13
  14. Afghan Hound Guest

    Afghan Hound, Aug 2, 2006
    #14
  15. wrote:
    > hi....i am preparing for interview...where can i get helpful c
    > interview questions and tips...also,can anybody provide me with a soft
    > copy of the c-faq book...thanx and regards..
    >
    > eric


    Just my opinion, but you probably don't want to try faking it at an
    interview. I can think up a dozen questions that are only answerable
    if you have real experience. Especially if you say you have xxx years
    of experience with xxxx C. Questions like:

    (1) If you've used this compiler more than 10 minutes, you've gotten
    the message "Insincere declaration of fungible foggy entity". What
    does this message really mean? (Most compilers have at least one very
    opaque het always-poping up error message). You rarely can learn this
    by reading a book.

    (2) If you've ever compiled anything with this compiler, you've gotten
    the run-time message "Seg Voil @ A0056" What do you do to find the
    cause of the problem. (Generic FAQ's are not very helpful in learning
    the quirks of a particular debugger).

    (3) That compiler likes to emit lots of one particular relatively
    harmless warning. How do you turn off just that warning (If you are a
    good programmer, you've probably enabled FULL warnings, but you most
    likely need to turn at least one of them off with a -NoWarn:C4996 )

    ..... and being found out to be a charlatan is a really good way to
    free up the rest of your morning. No more tedious interviews for you!


    On the other hand, if they lob softball questions at you, they're
    probably not going to be of much help to you if you're hired. Watch
    out for this too.
     
    Ancient_Hacker, Aug 2, 2006
    #15
  16. Ancient_Hacker <> wrote:

    > On the other hand, if they lob softball questions at you, they're
    > probably not going to be of much help to you if you're hired. Watch
    > out for this too.


    This, at least, is true, as I've learned the hard way.

    --
    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.
     
    Christopher Benson-Manica, Aug 2, 2006
    #16
  17. Christopher Benson-Manica wrote:
    >
    > Ancient_Hacker <> wrote:
    >
    > > On the other hand, if they lob softball questions at you, they're
    > > probably not going to be of much help to you if you're hired. Watch
    > > out for this too.

    >
    > This, at least, is true, as I've learned the hard way.


    I think every "C interview" should be mandated to include:

    1) What is the expected output of this program?

    void main()
    {
    int i = 10;
    i = i++;
    printf("%d",i);
    }

    This would allow both the interviewer and interviewee to determine
    if they're well matched.

    --
    +-------------------------+--------------------+-----------------------+
    | Kenneth J. Brody | www.hvcomputer.com | #include |
    | kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
    +-------------------------+--------------------+-----------------------+
    Don't e-mail me at: <mailto:>
     
    Kenneth Brody, Aug 2, 2006
    #17
  18. Kenneth Brody said:

    > I think every "C interview" should be mandated to include:
    >
    > 1) What is the expected output of this program?
    >
    > void main()
    > {
    > int i = 10;
    > i = i++;
    > printf("%d",i);
    > }


    That one's easy. It will - or at least should - output: "Fire the author of
    this code, and hire someone who knows the language instead." If it doesn't,
    that's because of the famous "printf bug" in their compiler.

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at above domain (but drop the www, obviously)
     
    Richard Heathfield, Aug 2, 2006
    #18
  19. said:

    > Hi Benson,
    >> > http://c-faq.com/malloc/cast.html
    >> > http://c-faq.com/malloc/mallocnocast.html

    >> I would modify the sources appropriately.

    > Done.
    > I have modified the sources (except one) using malloc to not to cast.
    >
    > Anything else needs to be corrected?


    On looking at the page again, I decided not to prepare a list. The
    superficial bugs - the ones the author put in deliberately (because that's
    the puzzle, so to speak) - are sufficiently jumpy-outy that I can't easily
    see past them to any underlying bugs (which might not even be there, after
    all) without spending more time than I am prepared to devote to the task.

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at above domain (but drop the www, obviously)
     
    Richard Heathfield, Aug 2, 2006
    #19
  20. Guest

    wrote:

    > Hi eric,
    > wrote:
    > > hi....i am preparing for interview...where can i get helpful c
    > > interview questions and tips...

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


    That's quite a resource you got there Gowri. I especially
    like the "programming interview questions". You don't
    seem to have the one which asks how you can detect a
    cycle in a link list. If I remember correctly van der Linden
    says that they always ask that at Sun interviews.

    You should put answers somewhere or at least hints. By
    the way in question 65 are you allowed to flip discs ? In
    75 I'm not clear what you're asking.

    Spiros Bousbouras
     
    , Aug 2, 2006
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vishal Pandey

    Interview Questions

    Vishal Pandey, Nov 24, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    629
    Vishal Pandey
    Nov 24, 2003
  2. Namratha Shah \(Nasha\)
    Replies:
    0
    Views:
    2,670
    Namratha Shah \(Nasha\)
    Nov 4, 2004
  3. vpcs

    Interview in Perl

    vpcs, Aug 17, 2004, in forum: Perl
    Replies:
    0
    Views:
    599
  4. Jobs
    Replies:
    0
    Views:
    1,029
  5. reema
    Replies:
    0
    Views:
    294
    reema
    Aug 26, 2008
Loading...

Share This Page