473,765 Members | 2,203 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

i need some C/C++ test intervie questions

hello everyone,
Iam vasant from India..
I have a test+interview on C /C++ in the coming month so plz help me
by giving some resources of FAQS, interview questions, tracky
questions, multiple choice questions.etc..
I'll be indebted to everyone..
Thanks in advance..
regards
vasant shetty
Bangalore
India
Nov 13 '05
162 14899
Joona I Palaste wrote:

Eric Sosman <Er*********@su n.com> scribbled the following:
Serve La wrote:

It turned out te be a test where every example compiled but didn't work as
expected.

like what is j at the end?
int i, j = 0;
for (i=0;i<5;i++);
j*=10;
printf("%d\n", j);

I'd give the tester low marks for this one, because
the ultimate answer is the same no matter whether you detect
or overlook the "gotcha."


Which gotcha where?


The indentation where there should not be any.

--
pete
Nov 13 '05 #21
On Tue, 2 Sep 2003 20:45:24 +0000 (UTC), Richard Heathfield
<do******@addre ss.co.uk.invali d> wrote:
Malcolm wrote:

This is a bit unfair.


Why? It's obvious what he's doing, so you can out-psych him easily. "If
Dennis Ritchie scores a 10, then I have to rank at 1, since I think Dennis
Ritchie is easily ten times as knowledgeable about C as I am. On the other
hand, I do know what C is. Now, let's get on with the test and find out how
good /you/ think I am."
For instance I could argue for a 9


Losing strategy, IMHO. See Luke 14, vv 7-11.


Sound counsel, too often ignored. Far better to be humble than
humbled.

Bill
Nov 13 '05 #22
In article <bj*********@cu i1.lmms.lmco.co m>, do**********@sp amhate.com says...
Personally, in my job hunting days, I walked out on an interviewer that
presumed to give me a test. I find the practice insulting.


I only wish all candidates who objected to being tested would do this -- I hate
wasting my time with the likes of people like you.

--
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/
Nov 13 '05 #23
On 2 Sep 2003 04:14:53 -0700, va****@engineer .com (techievasant) wrote
in comp.lang.c:
hello everyone,
Iam vasant from India..
I have a test+interview on C /C++ in the coming month so plz help me
by giving some resources of FAQS, interview questions, tracky
questions, multiple choice questions.etc..
I'll be indebted to everyone..
Thanks in advance..
regards
vasant shetty
Bangalore
India


"Name the ISO International Standard number for the C/C++ language."

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Nov 13 '05 #24
On Tue, 2 Sep 2003 19:01:29 +0100, "Malcolm"
<ma*****@55bank .freeserve.co.u k> wrote in comp.lang.c:

"Kevin D. Quitt" <KQ****@IEEInc. com> wrote in message

As an occasional interviewer, I find I have to give a test. The first
question asks the applicant to rate their knowledge of C from 1 to 10,
where 1 is "What's C?" and 10 is "I'm Dennis Ritchie". I use this to set
my expectation of the results from the rest of the test.

This is a bit unfair. For instance I could argue for a 9 since I use C all
the time and I hardly ever encounter problems that are due to my failure to
understand the language. On the other hand I'm not one of those people who
reads the standard for recreation, so I could be tripped up by trick
questions designed to test familiarity with little-used sections of the
standard.


Sadly most such tests I have seen tend to belabor the trickier parts
of the standard (or Koenig's "C Traps and Pitfalls"), so they are just
that.

A dozen or so years ago I interviewed with a local recruiter and they
had a test provided by the client they asked me to take. It was
specifically for the hot platform in those days, 16-bit x86.

It had perhaps 20 or 25 little tricky questions, and at the end they
said, according to answers provided by the client, I got one wrong.

All that proved was that the client was incorrect. I knew nothing of
standard C in those days, if indeed the first ANSI standard had been
ratified yes, but I knew every nook and cranny of unspecified and
implementation-defined behavior on every major x86 compiler, and what
they did in most instances of undefined behavior as well.

I can't remember if a job interview came out of that one, but I know I
passed on it if there was one.

I did rather enjoy taking the test.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Nov 13 '05 #25
On Tue, 2 Sep 2003 16:01:20 -0400, "Xenos" <do**********@s pamhate.com>
wrote in comp.lang.c:

[snip]

I guess I understand you wanting to gauge what they REALLY know (we seem to
have a lot of "know-it-alls" in this field who don't. Why is that?).


Can you name a field that doesn't?

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Nov 13 '05 #26
Richard Heathfield <do******@addre ss.co.uk.invali d> scribbled the following:
Malcolm wrote:
"Kevin D. Quitt" <KQ****@IEEInc. com> wrote in message
As an occasional interviewer, I find I have to give a test. The first
question asks the applicant to rate their knowledge of C from 1 to 10,
where 1 is "What's C?" and 10 is "I'm Dennis Ritchie". I use this to set
my expectation of the results from the rest of the test.
This is a bit unfair.

Why? It's obvious what he's doing, so you can out-psych him easily. "If
Dennis Ritchie scores a 10, then I have to rank at 1, since I think Dennis
Ritchie is easily ten times as knowledgeable about C as I am. On the other
hand, I do know what C is. Now, let's get on with the test and find out how
good /you/ think I am."


Whoever said the scale was linear?

--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"As we all know, the hardware for the PC is great, but the software sucks."
- Petro Tyschtschenko
Nov 13 '05 #27
pete <pf*****@mindsp ring.com> scribbled the following:
Joona I Palaste wrote:
Which gotcha where?
The indentation where there should not be any.


Yes I know, but you snipped the part where I said I knew.

--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"'So called' means: 'There is a long explanation for this, but I have no
time to explain it here.'"
- JIPsoft
Nov 13 '05 #28
Irrwahn Grausewitz <ir*****@freene t.de> scribbled the following:
Joona I Palaste <pa*****@cc.hel sinki.fi> wrote in
<bj**********@o ravannahka.hels inki.fi>:
Alex <al*******@hotm ail.com> scribbled the following:
It's still silly. Only your ability to distinguish between the
letters 'i' and 'j' is tested.
If you can't distinguish between them, then the code won't even
compile, as standard C doesn't define "jnt" or "prjntf".

#include <stdio.h>
#define prjntf printf
#define majn main typedef int jnt;
typedef void vojd; jnt majn( vojd )
{
jnt j;
for ( j = 42; j; j-- )
prjntf("%d ", j);
return j;
} :)))))


But if the person really had trouble distinguishing between i and j,
the code wouldn't even get past preprocessing, as C doesn't understand
the "#jnclude" or "#defjne" directives. Let alone know of a "stdjo.h"
header file.

--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"Insanity is to be shared."
- Tailgunner
Nov 13 '05 #29
Richard Heathfield <do******@addre ss.co.uk.invali d> wrote in message news:<bj******* ***@hercules.bt internet.com>.. .
Malcolm wrote:

"Kevin D. Quitt" <KQ****@IEEInc. com> wrote in message

As an occasional interviewer, I find I have to give a test. The first
question asks the applicant to rate their knowledge of C from 1 to 10,
where 1 is "What's C?" and 10 is "I'm Dennis Ritchie". I use this to set
my expectation of the results from the rest of the test.
This is a bit unfair.


Why? It's obvious what he's doing, so you can out-psych him easily. "If
Dennis Ritchie scores a 10, then I have to rank at 1, since I think Dennis
Ritchie is easily ten times as knowledgeable about C as I am.


RJH at 1???!!! This is indeed tooooo humble!!

In India, even if RJH says 1 out of 10, they won't select. AFAIK, all
are expected to grade 7/10

On the other
hand, I do know what C is. Now, let's get on with the test and find out how
good /you/ think I am."


But, IMHO most of the times, tests have failed to recognize the real
intellectuals.

---
"If there is a God, he must be a sadist!"
http://guideme.itgo.com/atozofc/ - "A to Z of C" Project
Email: rrjanbiah-at-Y!com
Nov 13 '05 #30

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.