By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,543 Members | 1,887 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,543 IT Pros & Developers. It's quick & easy.

i need some C/C++ test intervie questions

P: n/a
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 #1
Share this Question
Share on Google+
162 Replies


P: n/a
va****@engineer.com (techievasant) wrote in
<e3*************************@posting.google.com> :
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/
I'll be indebted to everyone..
Thanks in advance..
regards
vasant shetty
Bangalore
India


--
Air is water with holes in it.
Nov 13 '05 #2

P: n/a
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.

"Irrwahn Grausewitz" <ir*****@freenet.de> wrote in message
news:h1********************************@4ax.com...
va****@engineer.com (techievasant) wrote in
<e3*************************@posting.google.com> :
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/
I'll be indebted to everyone..
Thanks in advance..
regards
vasant shetty
Bangalore
India


--
Air is water with holes in it.

Nov 13 '05 #3

P: n/a
On Tue, 2 Sep 2003 12:37:40 -0400, "Xenos" <do**********@spamhate.com>
wrote:

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.
--
#include <standard.disclaimer>
_
Kevin D Quitt USA 91387-4454 96.37% of all statistics are made up
Per the FCA, this address may not be added to any commercial mail list
Nov 13 '05 #4

P: n/a

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

Nov 13 '05 #5

P: n/a

"Malcolm" <ma*****@55bank.freeserve.co.uk> wrote in message
news:bj**********@newsg2.svr.pol.co.uk...

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


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);
Nov 13 '05 #6

P: n/a
Serve La <ik@veranderhetal.nl> wrote:
"Malcolm" <ma*****@55bank.freeserve.co.uk> wrote in message
news:bj**********@newsg2.svr.pol.co.uk...

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

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
Nov 13 '05 #7

P: n/a
On Tue, 2 Sep 2003 19:01:29 +0100, "Malcolm"
<ma*****@55bank.freeserve.co.uk> 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. 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.
--
#include <standard.disclaimer>
_
Kevin D Quitt USA 91387-4454 96.37% of all statistics are made up
Per the FCA, this address may not be added to any commercial mail list
Nov 13 '05 #8

P: n/a

"Alex" <al*******@hotmail.com> wrote in message
news:NW***********************@news2.calgary.shaw. ca...
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?


Damn, should've started at 1 :-)
Nov 13 '05 #9

P: n/a
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."

--
Er*********@sun.com
Nov 13 '05 #10

P: n/a
Eric Sosman <Er*********@sun.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 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 (pa*****@cc.helsinki.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! ------------/
"'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
Nov 13 '05 #11

P: n/a
Serve La <ik@veranderhetal.nl> wrote:
"Alex" <al*******@hotmail.com> wrote in message
news:NW***********************@news2.calgary.shaw. ca...
> 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?

Damn, should've started at 1 :-)


It's still silly. Only your ability to distinguish between the
letters 'i' and 'j' is tested.

Alex
Nov 13 '05 #12

P: n/a
Alex <al*******@hotmail.com> scribbled the following:
Serve La <ik@veranderhetal.nl> wrote:
"Alex" <al*******@hotmail.com> wrote in message
news:NW***********************@news2.calgary.shaw. ca...
> 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?
Damn, should've started at 1 :-)
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 (pa*****@cc.helsinki.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! ------------/
"War! Huh! Good God, y'all! What is it good for? We asked Mayor Quimby."
- Kent Brockman
Nov 13 '05 #13

P: n/a
Joona I Palaste <pa*****@cc.helsinki.fi> wrote in
<bj**********@oravannahka.helsinki.fi>:
Alex <al*******@hotmail.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;
}

:)))))

--
Rain is just liquid sunshine.
Nov 13 '05 #14

P: n/a
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.

"Kevin D. Quitt" <KQ****@IEEInc.com> wrote in message
news:ub********************************@4ax.com...
On Tue, 2 Sep 2003 12:37:40 -0400, "Xenos" <do**********@spamhate.com>
wrote:

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.
--
#include <standard.disclaimer>
_
Kevin D Quitt USA 91387-4454 96.37% of all statistics are made up
Per the FCA, this address may not be added to any commercial mail list

Nov 13 '05 #15

P: n/a
Sorry: change "cast operator" to "sizeof and cast operators."

"Xenos" <do**********@spamhate.com> wrote in message
news:bj*********@cui1.lmms.lmco.com...
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).
DrX.

Nov 13 '05 #16

P: n/a
Xenos wrote:
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.
--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #17

P: n/a
Dr.X aka "Xenos" <do**********@spamhate.com> wrote in
<bj*********@cui1.lmms.lmco.com>:
Sorry: change "cast operator" to "sizeof and cast operators."

OK. But please stop top-posting. Thank you.
--
Rain is just liquid sunshine.
Nov 13 '05 #18

P: n/a
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.
--
#include <standard.disclaimer>
_
Kevin D Quitt USA 91387-4454 96.37% of all statistics are made up
Per the FCA, this address may not be added to any commercial mail list
Nov 13 '05 #19

P: n/a
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."
For instance I could argue for a 9


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

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #20

P: n/a
Joona I Palaste wrote:

Eric Sosman <Er*********@sun.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

P: n/a
On Tue, 2 Sep 2003 20:45:24 +0000 (UTC), Richard Heathfield
<do******@address.co.uk.invalid> 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

P: n/a
In article <bj*********@cui1.lmms.lmco.com>, do**********@spamhate.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

P: n/a
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.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Nov 13 '05 #24

P: n/a
On Tue, 2 Sep 2003 19:01:29 +0100, "Malcolm"
<ma*****@55bank.freeserve.co.uk> 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.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Nov 13 '05 #25

P: n/a
On Tue, 2 Sep 2003 16:01:20 -0400, "Xenos" <do**********@spamhate.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.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Nov 13 '05 #26

P: n/a
Richard Heathfield <do******@address.co.uk.invalid> 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.helsinki.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

P: n/a
pete <pf*****@mindspring.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.helsinki.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

P: n/a
Irrwahn Grausewitz <ir*****@freenet.de> scribbled the following:
Joona I Palaste <pa*****@cc.helsinki.fi> wrote in
<bj**********@oravannahka.helsinki.fi>:
Alex <al*******@hotmail.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.helsinki.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

P: n/a
Richard Heathfield <do******@address.co.uk.invalid> wrote in message news:<bj**********@hercules.btinternet.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

P: n/a
In article <ab**************************@posting.google.com >,
ng**********@rediffmail.com says...
In India, even if RJH says 1 out of 10, they won't select. AFAIK, all
are expected to grade 7/10


India has a recognized system about rating oneself against Dennis Ritchie?
That's very interesting. Tell us more.

--
Randy Howard _o
2reply remove FOOBAR \<,
______________________()/ ()______________________________________________
SCO Spam-magnet: po********@sco.com
Nov 13 '05 #31

P: n/a
Joona I Palaste <pa*****@cc.helsinki.fi> wrote in
<bj**********@oravannahka.helsinki.fi>:
Irrwahn Grausewitz <ir*****@freenet.de> scribbled the following:
Joona I Palaste <pa*****@cc.helsinki.fi> wrote in
<bj**********@oravannahka.helsinki.fi>:
Alex <al*******@hotmail.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.


Correct. I was thinking about a tweak to fix that, but there seem to
be no portable way to do it. Too sad. :)
--
No sig today.
Nov 13 '05 #32

P: n/a
On Tue, 02 Sep 2003 22:41:56 GMT, qe*@pobox.com (Paul Hsieh) wrote:
In article <bj*********@cui1.lmms.lmco.com>, do**********@spamhate.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.


Ditto.

If any sort of "exam" is to be part of an interview, it should be
stated beforehand.

Those of us who have been in the game for decades find this sort of
practice demeaning, and a good indication that it is a job we don't
want anyway. Therefore, it saves time on both persons' parts.

Oz
Nov 13 '05 #33

P: n/a
Kevin D. Quitt wrote:
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.


What if the reply is "Who?" ?

<g>

--
jc

Remove the -not from email

Nov 13 '05 #34

P: n/a
*** evil top posting fixed ***

Xenos wrote:
"Irrwahn Grausewitz" <ir*****@freenet.de> wrote in message
va****@engineer.com (techievasant) wrote in
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/


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


And, with absolutely no reason to assume you know anything at
all, you expect the interviewer to assume you to be an expert on
everything. You also exhibit a very fine sense of co-operation.

With any reasonable self-confidence (combined with actual
knowledge) I would expect a job applicant to be happy to show off
by taking such tests.

--
Replies should be to the newsgroup
Chuck Falconer, on vacation.
Nov 13 '05 #35

P: n/a
Randy Howard <ra**********@FOOmegapathdslBAR.net> wrote in message news:<MP************************@news.megapathdsl. net>...
In article <ab**************************@posting.google.com >,
ng**********@rediffmail.com says...
In India, even if RJH says 1 out of 10, they won't select. AFAIK, all
are expected to grade 7/10


India has a recognized system about rating oneself against Dennis Ritchie?
That's very interesting. Tell us more.


Sorry I don't mean it actually. I meant grading 1-10 stuff. I'd
thought that this grading system is only in India, but it seems
throughout the world people used to it!!...

Personally I'm against to our Indian system of interviewing. They ask
only the frequently asked interview questions---from certain interview
kind of books like "how to interview a programer" or so. It is very
unfortunate that the interviewer expects the person to answer specific
answer. Because of this system, even a person who knows little about C
can easily get into a nice job ('cos the questions are FAQ). Most of
the times, this sort of interviews failed to recognize the real
intellectuals (IMHO).

---
"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 #36

P: n/a
In article <ab**************************@posting.google.com >,
ng**********@rediffmail.com says...
India has a recognized system about rating oneself against Dennis Ritchie?
That's very interesting. Tell us more.
Sorry I don't mean it actually. I meant grading 1-10 stuff. I'd
thought that this grading system is only in India, but it seems
throughout the world people used to it!!...


I was kidding actually. :-)
Personally I'm against to our Indian system of interviewing. They ask
only the frequently asked interview questions---from certain interview
kind of books like "how to interview a programer" or so. It is very
unfortunate that the interviewer expects the person to answer specific
answer. Because of this system, even a person who knows little about C
can easily get into a nice job ('cos the questions are FAQ). Most of
the times, this sort of interviews failed to recognize the real
intellectuals (IMHO).


It sounds a lot like what some of the posters to this thread from other
parts of the world have indicated they would like and "not be insulting".
(ahem) It sounds like you also realize that not having some sort of
test (with sufficient detail) is unlikely to allow you to separate a B+
from an A+ programmer.

--
Randy Howard _o
2reply remove FOOBAR \<,
______________________()/ ()______________________________________________
SCO Spam-magnet: po********@sco.com
Nov 13 '05 #37

P: n/a
On 3 Sep 2003 06:26:47 -0700, ng**********@rediffmail.com (R. Rajesh Jeba
Anbiah) wrote:
Because of this system, even a person who knows little about C
can easily get into a nice job ('cos the questions are FAQ). Most of
the times, this sort of interviews failed to recognize the real
intellectuals (IMHO).


This is why I don't *just* use the test results to qualify a candidate.
--
#include <standard.disclaimer>
_
Kevin D Quitt USA 91387-4454 96.37% of all statistics are made up
Per the FCA, this address may not be added to any commercial mail list
Nov 13 '05 #38

P: n/a
In article <RQ****************@newsfep4-glfd.server.ntli.net>,
jd********@ntlworld-not.com says...
Kevin D. Quitt wrote:
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.


What if the reply is "Who?" ?


*gasp*

You're right. "Who is Dennis Ritchie?" makes for a pretty good weedout
filter on the telephone before they even come in. LOL

--
Randy Howard _o
2reply remove FOOBAR \<,
______________________()/ ()______________________________________________
SCO Spam-magnet: po********@sco.com
Nov 13 '05 #39

P: n/a

"R. Rajesh Jeba Anbiah" <ng**********@rediffmail.com> wrote in message
news:ab**************************@posting.google.c om...
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.


ah, so that's why I never pass :-)
Nov 13 '05 #40

P: n/a
On Wed, 3 Sep 2003 10:32:51 -0500, Randy Howard
<ra**********@FOOmegapathdslBAR.net> wrote:
In article <RQ****************@newsfep4-glfd.server.ntli.net>,
jd********@ntlworld-not.com says...
Kevin D. Quitt wrote:
> 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.


What if the reply is "Who?" ?


*gasp*

You're right. "Who is Dennis Ritchie?"


Didn't he have something to do with the Commodores?

Nov 13 '05 #41

P: n/a

"Richard Heathfield" <do******@address.co.uk.invalid> wrote in
For instance I could argue for a 9


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

Though sometimes interviewers are looking for self-confidence, which means
that the higher someone rate himself the better. If faced with a
psychological test of this nature than you should always rate yourself as
well as it is possible to defend.
Nov 13 '05 #42

P: n/a

"Jack Klein" <ja*******@spamcop.net> wrote in message

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.

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.

These can be quite good tests. If someone has bothered to learn all the
details of the standard then they will certainly know C very well, and they
will probably also have attitudes that make them a good programmer.

However if you know that the minutae of the standard will be tested, and
that a great deal hangs on this test, then the temptation is to spend a long
time cramming the standard which would be better employed on doing some real
programming.

Nov 13 '05 #43

P: n/a
Malcolm wrote:

"Richard Heathfield" <do******@address.co.uk.invalid> wrote in
> For instance I could argue for a 9
Losing strategy, IMHO. See Luke 14, vv 7-11.

Though sometimes interviewers are looking for self-confidence, which means
that the higher someone rate himself the better.


I think it's quite rare for those who interview me for C-based roles to come
away from the ordeal worrying about my diffidence.
If faced with a
psychological test of this nature than you should always rate yourself as
well as it is possible to defend.


I stand by my rating, and the follow-up: "Now let's get on with the test and
see how good at C /you/ think I am".

Nowadays, it's quite rare, at interview, to come across a C test that I
can't punch a few holes in. In this "rate yourself" game, I would be very
tempted to wind up the test by saying "...and that's why the behaviour is
well-defined, even though you thought it wasn't. And that was the last
question, right? And you, the tester, got seven of them wrong, yes? Okay,
if I rate 1 out of 10, that would appear to make you a 0, at best." But of
course I would resist that temptation, on courtesy grounds.
--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #44

P: n/a
Joona I Palaste wrote:
Richard Heathfield <do******@address.co.uk.invalid> 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?


Whoever said it wasn't? IMHO it's a fair assumption that it's linear, in the
absence of information to the contrary.

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #45

P: n/a

On Wed, 3 Sep 2003, Bill Reed wrote:

On Wed, 3 Sep 2003 10:32:51 -0500, Randy Howard wrote:
jd********@ntlworld-not.com says...
Kevin D. Quitt wrote:

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

What if the reply is "Who?" ?


*gasp*

You're right. "Who is Dennis Ritchie?"


Didn't he have something to do with the Commodores?


No; you're thinking of Bill Haley.
Nov 13 '05 #46

P: n/a
"Arthur J. O'Dwyer" <aj*@andrew.cmu.edu> wrote:
On Wed, 3 Sep 2003, Bill Reed wrote:
On Wed, 3 Sep 2003 10:32:51 -0500, Randy Howard wrote:
>jd********@ntlworld-not.com says...
>> Kevin D. Quitt wrote:
>> > 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".
>>
>> What if the reply is "Who?" ?
>
>*gasp*
>
>You're right. "Who is Dennis Ritchie?"


Didn't he have something to do with the Commodores?


No; you're thinking of Bill Haley.


Bill Haley was a C programmer?

--
No sig today.
Nov 13 '05 #47

P: n/a
Richard Heathfield wrote:

Joona I Palaste wrote:
Richard Heathfield <do******@address.co.uk.invalid> 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?


Whoever said it wasn't? IMHO it's a fair
assumption that it's linear, in the
absence of information to the contrary.


Some information to the contrary is there,
unles you consider Dennis Ritchie to be only about about
ten times more knowledgable than "What's C?"

--
pete
Nov 13 '05 #48

P: n/a
pete wrote:
Richard Heathfield wrote:

Joona I Palaste wrote:
> Richard Heathfield <do******@address.co.uk.invalid> 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?


Whoever said it wasn't? IMHO it's a fair
assumption that it's linear, in the
absence of information to the contrary.


Some information to the contrary is there,
unles you consider Dennis Ritchie to be only about about
ten times more knowledgable than "What's C?"

A reasonable point. Nevertheless, all this indicates is that the scale is
broken, since it means that anyone giving themselves a 7, say, might think
they were being suitably modest and suitably self-confident, and yet they
would only be claiming to have a tiny knowledge of C. If the scale is
log10, say, he'd be claiming only one milliritchie of C knowledge. I accept
that such knowledge is worth having, but it's unlikely to get you hired any
time soon. On the other hand, if it's log2, an interviewee who gives the
same reply is claiming a massive 125 milliritchies.

So I suppose the right answer is that the question is broken, or at least
provides insufficient information to give a meaningful answer. In this
case, however, the right answer is unlikely to get you hired unless the
interviewer is very clueful.

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #49

P: n/a
On Tue, 2 Sep 2003 21:33:55 +0200,
Serve La <ik@veranderhetal.nl> wrote
in Msg. <bj**********@news4.tilbu1.nb.home.nl>

"Alex" <al*******@hotmail.com> wrote in message
news:NW***********************@news2.calgary.shaw. ca...
> 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?


Damn, should've started at 1 :-)


And even then it works as expected. j is multiplied by 10. Once.

--Daniel

--
"With me is nothing wrong! And with you?" (from r.a.m.p)
Nov 13 '05 #50

162 Replies

This discussion thread is closed

Replies have been disabled for this discussion.