home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18452 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  1.7 KB

  1. Path: sparky!uunet!olivea!charnel!sifon!thunder.mcrcim.mcgill.edu!mouse
  2. From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Updated and improved "testing competence" questions
  5. Message-ID: <1992Dec16.085847.10266@thunder.mcrcim.mcgill.edu>
  6. Date: 16 Dec 92 08:58:47 GMT
  7. References: <1gbstkINNfcp@almaak.usc.edu>
  8. Organization: McGill Research Centre for Intelligent Machines
  9. Lines: 35
  10.  
  11. In article <1gbstkINNfcp@almaak.usc.edu>, ajayshah@almaak.usc.edu (Ajay Shah) writes:
  12.  
  13. > Questions for an exam on C (for hiring purposes)
  14.  
  15. > 3. How do you set up .c and .h files ? What goes into the .h and what
  16. > in the .c ?
  17.  
  18. This is, IMO, the only one that's actually a reasonable test of
  19. competence at programming in general, as opposed to language details.
  20. (Of course, if the position you're hiring for is language lawyer, the
  21. picky detail questions may be appropriate.)
  22.  
  23. > 9. What is the difference between 'X' and "X"?
  24. >    - 'X' is just the integer 88.  "X" is a pointer to a scratch space
  25. >      containing 88 followed by 0.
  26.  
  27. Where did you get 88?  Doesn't everyone know capital X is character
  28. 231?  (Only half a :-)
  29.  
  30. Actually, 'X' is an int whose value is whatever character code the
  31. implementation uses to represent the X character.  This may or may not
  32. be 88, 231, or any other specific value.
  33.  
  34. Herewith my own suggestion for a question.  Of course, this demands a
  35. fair degree of competence on the part of the interviewer, to evaluate
  36. the response, but the interviewer always has to be competent, or is in
  37. danger of being taken for a ride by a snow job artist.
  38.  
  39. Q: Give three rules of good programming style, and for each one, an
  40.    example of when it would be good to break it.
  41.  
  42.                     der Mouse
  43.  
  44.                 mouse@larry.mcrcim.mcgill.edu
  45.