f



Interview Questions

Hi,
I was wondering if anyone can point me at a good online resource for
C++ interview questions.
Thanks,
Pradyot

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
pradyot_s (5)
12/7/2003 1:51:05 AM
comp.lang.c++.moderated 10738 articles. 1 followers. allnor (8510) is leader. Post Follow

12 Replies
695 Views

Similar Articles

[PageSpeed] 12

Pradyot Dhulipala was seen penning the following ode to ... whatever:
> Hi,
> I was wondering if anyone can point me at a good online resource for
> C++ interview questions.

Why not go to the C++ FAQ and use a few of the questions that are on
there? If you use some of the 'easier' ones then you should be able to
get a good idea of the interviewee's grasp of C++.

-- 
Timo Geusch

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Timo
12/7/2003 3:01:03 PM
Hi,

Timo Geusch wrote:

>>I was wondering if anyone can point me at a good online resource for
>>C++ interview questions.

> Why not go to the C++ FAQ

Question 6.13 is most relevant:

http://www.parashift.com/c++-faq-lite/big-picture.html#faq-6.13

-- 
Maciej Sobczak : http://www.msobczak.com/
Programming    : http://www.msobczak.com/prog/


      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Maciej
12/8/2003 9:26:02 PM
pradyot_s@yahoo.com (Pradyot Dhulipala) schrieb/wrote:

> I was wondering if anyone can point me at a good online resource for
> C++ interview questions.

http://www.parashift.com/c++-faq-lite/big-picture.html#faq-6.13

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Eberhard
12/8/2003 9:27:03 PM
Generally! The best interviews I have had has been when given a short
compilable sample program and a set questions that gets a discussion
going. Typical questions would be something like.

* Are there any portability issues and how can they be prevented
* Is performance optimal what can be done to enhance performance
* Is the code safe
* Can the code be clarified, made simpler
* Suggest refactorings
* Do you note any specific tradeoffs in the code
* Coding style, anything lacking, other critique suggest improvments

Generally try to go for broad issues to get a discussion going to get
the candidate to go into general reasoning about programming, design,
algorithms, complexity and architecture at large and in small. This is
the most important when hiring a programmer. Proficiency in a C++ can be
obtained later. The general understanding and knowledge far more
important than rock solid C++ understanding.

Questions regarding outputs of algorithms and small syntactic errors
should be avoided since they shadow the big issues.

/Michel

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
ISO
12/8/2003 11:05:57 PM
Michel Andr� <michel.andre@swipnet.se> wrote:
 > * Suggest refactorings

You know you havn't found the person you want to hire yet when the
interviewee suggest taking

#define DAY_MINUTES (24 * 60)

and turning it into

#define DAY_MINUTES (8 * 180)

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Roy
12/9/2003 10:49:57 AM
On 9 Dec 2003 05:49:57 -0500, Roy Smith <roy@panix.com> wrote:

>Michel Andr� <michel.andre@swipnet.se> wrote:
> > * Suggest refactorings
>
>You know you havn't found the person you want to hire yet when the
>interviewee suggest taking
>
>#define DAY_MINUTES (24 * 60)
>
>and turning it into
>
>#define DAY_MINUTES (8 * 180)


Ah, the Firm with no sense of humor...  ;-)


      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
alfps
12/9/2003 5:03:29 PM
In article <roy-631AC0.18495108122003@reader2.panix.com>, Roy Smith 
<roy@panix.com> writes
>Michel Andr� <michel.andre@swipnet.se> wrote:
> > * Suggest refactorings
>
>You know you havn't found the person you want to hire yet when the
>interviewee suggest taking
>
>#define DAY_MINUTES (24 * 60)
>
>and turning it into
>
>#define DAY_MINUTES (8 * 180)

How about:
#define DAY_MINUTES (45 << 5)

:-) After all we know that shifting is more efficient than 
multiplication:-)


-- 
Francis Glassborow      ACCU
If you are not using up-to-date virus protection you should not be reading
this. Viruses do not just hurt the infected but the whole community.


      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Francis
12/9/2003 5:06:55 PM
 > I was wondering if anyone can point me at a good online resource for
 > C++ interview questions.

You didn't say whether you are taking or giving the test. In Spring, 1998 I
published a list of questions and answers for C++ interviews in a Dr. Dobb's
Journal Special Report on Software Careers. The article generated a lot of
email discussion, with lots of suggestions for other questions and some
debate about some of my answers to my own questions.

The article is available from the magazine. http://www.ddj.com. I haven't
looked at it in a long time. I hope it's still relevant.

Al Stevens
http://www.alstevens.com


      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Al
12/9/2003 10:04:02 PM
Alf P. Steinbach wrote:

 >>Michel Andr� <michel.andre@swipnet.se> wrote:
 >>
 >>>* Suggest refactorings
 >>
 >>You know you havn't found the person you want to hire yet when the
 >>interviewee suggest taking
 >>
 >>#define DAY_MINUTES (24 * 60)
 >>
 >>and turning it into
 >>
 >>#define DAY_MINUTES (8 * 180)
 >
 >
 >
 > Ah, the Firm with no sense of humor...  ;-)

So its fully "refactored" when you have :)?

#define DAY_MINUTES (2*2*2*2*2*3*3*5)


/Michel

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
ISO
12/9/2003 10:04:25 PM
Al Stevens was seen penning the following ode to ... whatever:
 > > I was wondering if anyone can point me at a good online resource for
 > > C++ interview questions.

<snip reference to Al's DDJ article discussing interview questions>

 > The article is available from the magazine. http://www.ddj.com. I haven't
 > looked at it in a long time. I hope it's still relevant.

 From memory - sorry, I don't have the time to dig out the article - I
think most of it is still relevant. At least from my experience of
conducting technical interviews one is mainly concerned with
establishing that the person you're interviewing knows C++ to an
acceptable level. To me, that means that someone has to demonstrate
that they are familiar with the basic and intermediate level concepts
of C++; if you're interviewing a self-professed C++ guru than you will
diverge from your scripted interview questions sooner rather than
later.

Given that a lot of companies are still using older C++ compilers -
VC++ 6 is still the default compiler where I work - interviewing for
the very latest in C++ technology developments probably doesn't add
much value.
-- 
Timo Geusch

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Timo
12/10/2003 11:36:51 AM
Timo Geusch <tnews@unixconsult.co.uk> wrote in message
news:<slrnbtdhbm.2q2o.tnews@nermal.unix-consult.com>...

> Given that a lot of companies are still using older C++ compilers -
> VC++ 6 is still the default compiler where I work - interviewing for
> the very latest in C++ technology developments probably doesn't add
> much value.

Unless there are plans to migrate to a more recent compiler some time in
the future.  VC++ 6, G++ 2.95 and the like seem to be the most widely
used compilers currently; I can certainly understand a company with a
large base of existing code being hesitant about upgrading.  On the
other hand, IMHO, a company would be amiss if they weren't making long
term plans as to how to manage such an upgrade, and if they weren't
preparing for it some time in the future.

--
James Kanze           GABI Software        mailto:kanze@gabi-soft.fr
Conseils en informatique orient�e objet/     http://www.gabi-soft.fr
                    Beratung in objektorientierter Datenverarbeitung
11 rue de Rambouillet, 78460 Chevreuse, France, +33 (0)1 30 23 45 16

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
kanze
12/10/2003 8:32:05 PM
Hi,

I long while ago when I used to write machine code, I'd XOR the vars a
few times to swap them, but it doesn't seem a very SAS like question,
more a low level programming question.  To get more SAS like:  Does
this have to be done in a datastep?  What are the constraints on A and
B?  Are they integers. Could they be greater than 2**32?  Are their
absolute values near 1.797E308? How many significent digits are there
in each?  How many orders of magnitude is the difference between the
numbers?  There are a lot of ways swapping could go wrong.

Trivial SAS solutions with no explicit temporary variables ...

proc sql;
   create table test as select x as y, y as x from test;
quit;

data test(rename=(x=y y=x));
   set test;
run;

Regards
++ Guido

On 07/06/07, Jonas Bilenas <jonas.bilenas@chase.com> wrote:
> Someone at work recalled an interview question he had with another bank a
> while back:
>
>  A dataset has 2 numeric variables; A and B.
>  You want to switch the values of A and B without using the creation of
>  a new variable.  For example, if A=1 and B=2 you want A=2 and B=1.
>
> A bit easier if numeric variables are involved but it can be also coded
> with string variables (I think).
>
> Jonas
>
0
cymraegerict (126)
6/7/2007 2:40:20 PM
Reply: