Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #9577
| From | Edek <edek.pienkowski@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Am I not confident enuff to do this? |
| Date | 2011-08-31 22:55 +0200 |
| Organization | ATMAN - ATM S.A. |
| Message-ID | <j3m79l$5mr$1@node2.news.atman.pl> (permalink) |
| References | <rchq57132mpjq7hc75ccb5ivcfin294vl5@4ax.com> <8c7f29fb-9ae0-4295-9715-a2930f21d1ff@i21g2000yqd.googlegroups.com> |
On 08/31/2011 10:13 AM, hanukas wrote:
> On Aug 30, 11:31 pm, Heck
> <heckja...@ordertostymieharvestersverizon.net> wrote:
>> I was given a programming question on a tech test that made me doubt
>> myself. It seemed too simple. Did I miss something? This is the
>> text of the question exactly as I got it:
>>
>> Without defining any new variable or passing an argument to function,
>> I want you to be able to increment a number every time this method is
>> called. (Chose a language of your choice and write a fully compilable
>> method)
>>
>> At the very least, this is a poorly framed question. What number
>> should be incremented? Where is it located, what is its scope and its
>> lifetime? If I should create no new variables, how is this number to
>> come into existence? Else, it must already be in existence and the
>> method I create has to be able to access it. Such a combination of
>> characteristics is a static variable with file or class scope.
>>
>> Is this question for real, or did I really miss someting that will at
>> least make me feel stupid, or worse, reveal to me that I am stupider
>> than I allow for?
>>
>> TIA
>
> The correct answer out in the real world would be: "Please specify
> more exactly what you want to be done, sir."
I would say "void call_me() {}" and keep generating playful
distractions when asked what I mean by that.
Profiling is the key to the answer. Good enough? Did I pass sir?
Edek
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Am I not confident enuff to do this? Heck <heckja_in@ordertostymieharvestersverizon.net> - 2011-08-30 16:31 -0400
Re: Am I not confident enuff to do this? Paavo Helde <myfirstname@osa.pri.ee> - 2011-08-30 15:50 -0500
Re: Am I not confident enuff to do this? Heck <heckja_in@ordertostymieharvestersverizon.net> - 2011-08-30 23:50 -0400
Re: Am I not confident enuff to do this? Ian Collins <ian-news@hotmail.com> - 2011-08-31 16:00 +1200
Re: Am I not confident enuff to do this? "Waldek M." <wm@localhost.localdomain> - 2011-08-31 18:43 +0200
Re: Am I not confident enuff to do this? Juha Nieminen <nospam@thanks.invalid> - 2011-08-31 06:24 +0000
Re: Am I not confident enuff to do this? hanukas <jukka@liimatta.org> - 2011-08-31 01:13 -0700
Re: Am I not confident enuff to do this? Edek <edek.pienkowski@gmail.com> - 2011-08-31 22:55 +0200
Re: Am I not confident enuff to do this? Krice <paulkp@mbnet.fi> - 2011-09-01 00:00 -0700
Re: Am I not confident enuff to do this? "hugo_ribeira@hotmail.com" <hugo_ribeira@hotmail.com> - 2011-09-01 03:27 -0700
Re: Am I not confident enuff to do this? James Kanze <james.kanze@gmail.com> - 2011-09-01 15:56 -0700
Re: Am I not confident enuff to do this? red floyd <no.spam.here@its.invalid> - 2011-09-01 17:01 -0700
Re: Am I not confident enuff to do this? Joe Greer <jgreer@doubletake.com> - 2011-09-02 15:34 +0000
Re: Am I not confident enuff to do this? Paavo Helde <myfirstname@osa.pri.ee> - 2011-09-02 10:47 -0500
Re: Am I not confident enuff to do this? Daniel Bradley <daniel@bradley.mx> - 2011-09-07 14:58 +0000
Re: Am I not confident enuff to do this? "Thomas J. Gritzan" <phygon_antispam@gmx.de> - 2011-09-12 03:31 +0200
csiph-web