i need some C/C++ test intervie questions

T

techievasant

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
 
I

Irrwahn Grausewitz

(e-mail address removed) (techievasant) wrote in
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..
Hm, this your second post of this kind within 13 hours to comp.lang.c
and comp.lang.c.moderated respectively. Neither one has been replied
to yet. There are genuine search engines on the web one can use to
retrieve the material you are asking for. Two years ago I found some
companies that had sample tests on their web-sites - unfortunately I've
lost the URLs.

As for the FAQs:
http://www.faqs.org/faqs/by-newsgroup/comp/
 
X

Xenos

Personally, in my job hunting days, I walked out on an interviewer that
presumed to give me a test. I find the practice insulting.

DrX.
 
K

Kevin D. Quitt

Personally, in my job hunting days, I walked out on an interviewer that
presumed to give me a test. I find the practice insulting.

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.

The test isn't pass/fail - it's for me to get a handle on the person's
knowledge and familiarity with C. Somebody who claims to be an expert but
misses some fairly obvious questions is rated lower than somebody who
rates themselves as middling and answer the same questions the same way.

How else am I to determine whether an individual has the skills I need?
If my software department was a couple hundred people, I wouldn't have to
do this, because if the programmer isn't really good enough, it probably
won't have a major impact, and maybe they can pick up what they need. But
I'm in a small shop and can't afford to be so generous.

That said, I *will* hire somebody who's not quite up to what I'm looking
for, as long as they have the basics and seem to be open and willing to
learn.
 
M

Malcolm

Kevin D. Quitt said:
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.
 
S

Serve La

Malcolm said:
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.

Yeah, I had a C test once. I told the person that took the test that there
are always little things in there that you don't know or need. He didn't
like me saying that at all :)
To the OP:
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);
 
A

Alex

Yeah, I had a C test once. I told the person that took the test that there
are always little things in there that you don't know or need. He didn't
like me saying that at all :)
To the OP:
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);

Most obviously 0. What else could it be?

Alex
 
K

Kevin D. Quitt

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.

I didn't imagine it would (or could) be completely fair. I rate myself
about an 8 on that scale because I consider myself an expert in C; I'm not
a guru and perhaps a bit of a language lawyer. And while there are some
questions about obscure parts of the standard (there are none, for
example, about scanf magic), most are practical (should you check the
return values from library routines? why/why not), and a few are bullshit
filters (under which C standards have you programmed?). And some are
tricky and not particularly useful (e.g., adding two numbers without
arithmetic or bitwise operators).

What I've found is that, no matter how a person rated themselves, the
number of correct answers fell into two categories: <= 33% and >=80%.
Curiously, (or perhaps not), there is almost a one-to-one correlation
between being in the high group and those who answer "yes" to "Do you know
what the comp.lang.c FAQ is?".

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.

So you wouldn't get a perfect score. Tough. And by the way, I don't get
all the answers right to some of the tricky questions unless I've gone
over it recently. Partly they're there to make sure *nobody* gets a
perfect score.
 
E

Eric Sosman

Serve said:
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."
 
J

Joona I Palaste

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 C standard fully allows implementations that
have an INT_MAX of several trillions, way over one hundred thousand.
Oh, wait. Dang. Just noticed that INT_MAX has nothing to do with it.
That sneaky for loop.

--
/-- Joona Palaste ([email protected]) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"'It can be easily shown that' means 'I saw a proof of this once (which I didn't
understand) which I can no longer remember'."
- A maths teacher
 
J

Joona I Palaste

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".

--
/-- Joona Palaste ([email protected]) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"War! Huh! Good God, y'all! What is it good for? We asked Mayor Quimby."
- Kent Brockman
 
X

Xenos

I don't know. Being tested in an interview just never sat well with me. I
never minded them want to see programs that I've written or college projects
or even just asking me questions to test my knowledge. I also never liked
being called up out of the blue by a possible employer and being asked to
send my transcripts--I told them my transcripts were none of their business
(if they were planning to interview me and wanted me to bring them, well
that's a different story).

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?). I
don't have a better solution, but I still hate being tested in an interview.
:)

One thing we do do is hire co-ops that have impressed us with hard work and
aptitude.

As an extreme of my distaste for this is an article I read in a C/C++
journal (I forget which). In it the author kept patting himself on the back
for his guru-like knowledge of C's darker recesses (of which, some he was
actually wrong about). The article was mainly about how he would test
interviewees on this knowledge, and how most would fail (and gee wasn't he
smart for knowing what they didn't). He stated things like how the people
should study the operator precedence table before an interview! Now, we
know how that can get you into trouble when the operator precedence table
and the standard's parser rules collide (like with cast operator when
dealing with parentheses). What a waste of time for his company and the
applicant.

I'm less concerned with a new hire's impressive list of languages he know
intimately. I like new hired that have the ability apply knowledge than
regurgitate information. That's what reference material is for.

DrX.
 
I

Irrwahn Grausewitz

Joona I Palaste said:
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;
}

:)))))
 
R

Richard Heathfield

Xenos said:
Personally, in my job hunting days, I walked out on an interviewer that
presumed to give me a test. I find the practice insulting.

That's entirely your privilege, of course. In my own experience, the best
programmers are only too willing to demonstrate their knowledge, and are
not offended or insulted when asked so to do. The only difficulty with C
tests is that of finding an opportunity to demonstrate to the "examiner"
that your answers are correct; not all people who set C tests are quite as
familiar with C as they perhaps should be.

I would not grant an interview to someone unwilling to take a test.
 
K

Kevin D. Quitt

One more thing: my test is sent to the applicant ahead of time unless
circumstances don't permit. If they have to take it at the plant, there's
no time limit and I don't pay attention to the clock.
 
R

Richard Heathfield

Malcolm said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top