Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: An interview question

Reply
Thread Tools

Re: An interview question

 
 
Seebs
Guest
Posts: n/a
 
      03-05-2010
On 2010-03-05, Debanjan <(E-Mail Removed)> wrote:
> He want me to solve the problem using standard library function,but
> without declaring any header file and of-course I was not allowed to
> copy paste either from <time.h>.What I was told that if I want to use
> struct tm it's the same layout as http://en.wikipedia.org/wiki/Time.h,that
> is the fifth member is the tm_mon.


Sounds stupid to me. I would see no reason to attempt such a thing, I
also don't necessarily think it's a good thing to make the assumption that
struct tm has exactly those members in that order. It may or may not be
guaranteed, I can't remember, but... I sure wouldn't wanna bet on it.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
 
Reply With Quote
 
 
 
 
Seebs
Guest
Posts: n/a
 
      03-05-2010
On 2010-03-05, Debanjan <(E-Mail Removed)> wrote:
>> Sounds stupid to me. *I would see no reason to attempt such a thing, I
>> also don't necessarily think it's a good thing to make the assumption that
>> struct tm has exactly those members in that order. *It may or may not be
>> guaranteed, I can't remember, but... I sure wouldn't wanna bet on it.


> May be he wants some platform specific stuffs !


Sounds like a pretty bad interview question to me.

Look at it this way: It doesn't sound like a question I'd be able to answer.
I was on the language committee for about a decade, and I've done compiler
maintenance. If a question on an interview sounds to me like it's
unanswerable, I respectfully submit that the question is probably poorly
chosen.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / (E-Mail Removed)
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
 
Reply With Quote
 
 
 
 
Andrew Poelstra
Guest
Posts: n/a
 
      03-05-2010
On 2010-03-05, Debanjan <(E-Mail Removed)> wrote:
>> Sounds stupid to me. *I would see no reason to attempt such a thing, I
>> also don't necessarily think it's a good thing to make the assumption that
>> struct tm has exactly those members in that order. *It may or may not be
>> guaranteed, I can't remember, but... I sure wouldn't wanna bet on it.

>
> May be he wants some platform specific stuffs !


Maybe he's an imbecile. You don't want to work for him.

--
Andrew Poelstra
http://www.wpsoftware.net/andrew
 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      03-05-2010
Seebs wrote:

> Sounds like a pretty bad interview question to me.


Sounds like a terrific one to me. You can just get up, shake his hand,
and leave without wasting any more of your time.



Brian

--
Day 396 of the "no grouchy usenet posts" project
 
Reply With Quote
 
Seebs
Guest
Posts: n/a
 
      03-05-2010
On 2010-03-05, Default User <(E-Mail Removed)> wrote:
> Seebs wrote:
>> Sounds like a pretty bad interview question to me.


> Sounds like a terrific one to me. You can just get up, shake his hand,
> and leave without wasting any more of your time.


Oooh, good point. I had not considered that angle.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / (E-Mail Removed)
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      03-06-2010
"Default User" <(E-Mail Removed)> writes:
> Seebs wrote:
>> Sounds like a pretty bad interview question to me.

>
> Sounds like a terrific one to me. You can just get up, shake his hand,
> and leave without wasting any more of your time.


Or you can tell the interviewer that it's a very silly thing to do,
and he can tell you that was the answer he was looking for.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Tim Rentsch
Guest
Posts: n/a
 
      03-06-2010
Seebs <(E-Mail Removed)> writes:

> On 2010-03-05, Debanjan <(E-Mail Removed)> wrote:
>>> Sounds stupid to me. I would see no reason to attempt such a thing, I
>>> also don't necessarily think it's a good thing to make the assumption that
>>> struct tm has exactly those members in that order. It may or may not be
>>> guaranteed, I can't remember, but... I sure wouldn't wanna bet on it.

>
>> May be he wants some platform specific stuffs !

>
> Sounds like a pretty bad interview question to me.
>
> Look at it this way: It doesn't sound like a question I'd be able to answer.
> I was on the language committee for about a decade, and I've done compiler
> maintenance. If a question on an interview sounds to me like it's
> unanswerable, I respectfully submit that the question is probably poorly
> chosen.


You may be assuming the OP has relayed the question accurately;
he might not have. Also the interviewer may have had other,
quite different motivations for asking the question, which
didn't come through in the posted description.
 
Reply With Quote
 
Richard Bos
Guest
Posts: n/a
 
      03-10-2010
Keith Thompson <(E-Mail Removed)> wrote:

> "Default User" <(E-Mail Removed)> writes:
> > Seebs wrote:
> >> Sounds like a pretty bad interview question to me.

> >
> > Sounds like a terrific one to me. You can just get up, shake his hand,
> > and leave without wasting any more of your time.

>
> Or you can tell the interviewer that it's a very silly thing to do,
> and he can tell you that was the answer he was looking for.


And then you can tell him that you'd prefer your employer not to be
trying to set traps for his employees.

Really, if _you_ would do that to _him_, you'd never get hired. Why
should he be allowed any more dishonesty than you?

Richard
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      03-10-2010
(E-Mail Removed) (Richard Bos) writes:
> Keith Thompson <(E-Mail Removed)> wrote:
>> "Default User" <(E-Mail Removed)> writes:
>> > Seebs wrote:
>> >> Sounds like a pretty bad interview question to me.
>> >
>> > Sounds like a terrific one to me. You can just get up, shake his hand,
>> > and leave without wasting any more of your time.

>>
>> Or you can tell the interviewer that it's a very silly thing to do,
>> and he can tell you that was the answer he was looking for.

>
> And then you can tell him that you'd prefer your employer not to be
> trying to set traps for his employees.
>
> Really, if _you_ would do that to _him_, you'd never get hired. Why
> should he be allowed any more dishonesty than you?


In a real job, you're likely to be faced with bad requirements.
As an interviewer, how would you judge an applicant's ability and
willingness to question such requirements?

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      03-10-2010
Keith Thompson wrote:

> (E-Mail Removed) (Richard Bos) writes:
> > Keith Thompson <(E-Mail Removed)> wrote:
> >> "Default User" <(E-Mail Removed)> writes:
> >> > Seebs wrote:
> >> >> Sounds like a pretty bad interview question to me.
> >> >
> >> > Sounds like a terrific one to me. You can just get up, shake his

> hand, >> > and leave without wasting any more of your time.
> >>
> >> Or you can tell the interviewer that it's a very silly thing to do,
> >> and he can tell you that was the answer he was looking for.

> >
> > And then you can tell him that you'd prefer your employer not to be
> > trying to set traps for his employees.
> >
> > Really, if you would do that to him, you'd never get hired. Why
> > should he be allowed any more dishonesty than you?

>
> In a real job, you're likely to be faced with bad requirements.
> As an interviewer, how would you judge an applicant's ability and
> willingness to question such requirements?


That's true, but irrelevant. The requirements in a real job should not
be a deliberate trap to see what the reaction will be.

In the given case, the applicant has no way of knowing a trap has been
set. The best he or she can do is assume that this is a legitimate
question. Given that assumption, then the only reasonable conclusion is
that it's a clueless question that indicates a clueless interviewer,
futher indicating a clueless organization.

Like I said, get up and leave. Whether it's a dumb question or a trap
doesn't matter.




Brian

--
Day 400 of the "no grouchy usenet posts" project
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP Interview Questions ASP Interview Questions reema ASP General 0 08-26-2008 11:57 AM
.NET Interview Question, C#, ASP.NET Interview Questions dotnetuncle Javascript 0 10-30-2007 03:08 PM
An interview question Jerry Java 22 06-12-2005 03:55 PM
Interview question Gopal Krish ASP .Net 10 10-23-2004 10:18 AM
interview question (toughest bug you've fixed)? Digital Puer Java 17 12-27-2003 09:35 AM



Advertisments