Frequent Job Interviewing Questions

This is a discussion on Frequent Job Interviewing Questions within the A Brief History of Cprogramming.com forums, part of the Community Boards category; this is from one of the links... 8. How many points are there on the globe where by walking one ...

  1. #16
    Registered User
    Join Date
    Jun 2004
    Posts
    277
    this is from one of the links...

    8. How many points are there on the globe where by walking one mile south,
    one mile east and one mile north you reach the place where you started.
    I have no idea about this one... Is it serious?

  2. #17
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,399
    Aye. If you think a little bit, you'll find one of them. If you think harder, you'll find an infinite number of them.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  3. #18
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Quote Originally Posted by pianorain
    Aye. If you think a little bit, you'll find one of them. If you think harder, you'll find an infinite number of them.
    erm, i can only think of one. How can you have an infinite number of them?

  4. #19
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    You need to use the typedef keyword in conjunction with declaration of a C struct and you don't with a C++ struct.
    I know what you are trying to get at but using typedef isn't required for a C struct. You'll just have to use struct name instead of just name

  5. #20
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,399
    Quote Originally Posted by Perspective
    erm, i can only think of one. How can you have an infinite number of them?
    The easy one is the North Pole. Go one mile south, one mile east, one mile north, and you're right back to where you started. You can find the others near the South Pole. Find a circle centered on the South Pole that has the circumference of a mile. Pick any point one mile north of that circle, and go. Additionally, you can find a circle centered on the South Pole that has the circumference of a half-mile, quarter-mile, etc. Starting one mile north of those circles will yield the same results.

    edit: Concerning the last part, you're not limited to circles with circumferences that are 1/2^n of a mile. Any circumference that is 1/x of a mile is sufficient.
    Last edited by pianorain; 02-24-2005 at 02:09 PM.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  6. #21
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    ohhhh, clever. I hadnt heard that one before.

  7. #22
    former member Brain Cell's Avatar
    Join Date
    Feb 2004
    Posts
    472
    For all those who applied for a programming job :

    Which would help you most to get the job : your personal portfolio , your experience (like worked with few APIs\systems ..etc) or the job interview?
    My Tutorials :
    - Bad programming practices in : C
    - C\C++ Tips
    (constrcutive criticism is very welcome)


    - Brain Cell

  8. #23
    Registered User
    Join Date
    Jun 2004
    Posts
    277
    Quote Originally Posted by pianorain
    The easy one is the North Pole.
    I cant visualize it Can you explain better please?

  9. #24
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Posts
    2,572
    Quote Originally Posted by Brain Cell
    For all those who applied for a programming job :

    Which would help you most to get the job : your personal portfolio , your experience (like worked with few APIs\systems ..etc) or the job interview?

    EXPERIENCE beats everything else hands down.

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

  10. #25
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    Quote Originally Posted by Maragato
    I cant visualize it Can you explain better please?
    http://www.google.com/search?q=walki...+Feeling+Lucky
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  11. #26
    Registered User
    Join Date
    Jun 2004
    Posts
    277
    Quote Originally Posted by Dave_Sinkula
    If you had read it instead of just posting you would notice there is no explanation about it. Just ppl saying it is right.

  12. #27
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    Quote Originally Posted by Maragato
    If you had read it instead of just posting you would notice there is no explanation about it. Just ppl saying it is right.
    I did read it -- did you?
    solution: one mile south aha:

    problem: how many places are there on the earth that one could walk one mile south, then one mile east, then one mile north and end up in the same spot? to be precise, let's assume the earth is a solid smooth sphere, so oceans and mountains and other such things do not exist. you can start at any point on the sphere and walk in any direction you like. think you've figured it out? i'll tell you now, there is more than one. in fact, there are more than two. also be advised that walking north from the north pole (or south from the south pole) is illogical and therefore does not enter into the problem. all normal assumptions about directions will be used.

    there are no tricks involved with this question. it just forces you to really think about the problem to come up with all the solutions.

    solution:

    well the north pole is one such place.

    then somewhere near the south pole such that when you walk one mile south you are at the point on the earth where the circumference is 1. that way when you walk 1 mile east, you end up back at the same point. and of course one mile north from there puts you back where you started. here is a drawing courtesy of jy. there may or may not be such a place in the northern hemisphere where walking a mile south puts you at the 1 mile circumference point on the earth.

    i'm no geometry sphere expert, so someone will have to let me know if that is physically possible (i.e. i tend to think that if you walk n units south from any point on the northern part of a sphere, other than the north pole, it is impossible for the circumference to be n or less than n, but who knows?)

    finally there are actually an infinite number of points. if we consider the case before where we went to the point with a circumference of 1, why not go to the point with a circumference of 1/2. then when you go a mile east, you loop around twice, and end up in the same spot. this holds true for 1/3, 1/4, 1/5, ... 1/n, etc.
    And please click the drawing.

    ** edited by sean_mackrory **
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  13. #28
    UCF Mystic_Skies's Avatar
    Join Date
    Oct 2004
    Posts
    33
    Quote Originally Posted by Brain Cell
    For all those who applied for a programming job :

    Which would help you most to get the job : your personal portfolio , your experience (like worked with few APIs\systems ..etc) or the job interview?
    Experience was definitely the biggest one but they told me after that is established, all they are really doing is giving you the "a-hole" test to make sure you can work with large groups. (at least companies working on team projects)

  14. #29
    Registered User
    Join Date
    Jun 2004
    Posts
    277
    Thanks a lot sean now I got it with the drawing, man I will never get a job this way!

  15. #30
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Here's one from an interview I had:

    Given a node in a singly linked list, with no other knowledge of the list (i.e. not knowing the head), how would you remove that node?
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

Page 2 of 4 FirstFirst 1234 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Totally confused on assigment using linked lists
    By Uchihanokonoha in forum C++ Programming
    Replies: 8
    Last Post: 01-05-2008, 03:49 PM
  2. A very long list of questions... maybe to long...
    By Ravens'sWrath in forum C Programming
    Replies: 16
    Last Post: 05-16-2007, 05:36 AM
  3. Object oriented job questions
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-28-2004, 04:06 AM
  4. Looking for sample MC test questions for a job
    By garp in forum C Programming
    Replies: 2
    Last Post: 09-29-2003, 05:30 AM
  5. I can't find a job.
    By Cheeze-It in forum A Brief History of Cprogramming.com
    Replies: 42
    Last Post: 06-29-2003, 08:35 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21