# What should be the answer to the question - How much do you rate yourself in C programming on the scale of 10?

#### Fanfire174

Joined Mar 13, 2018
240
I am looking job for embedded engineer What should be the answer to the question - How much do you rate yourself in C programming on the scale of 10. This is a question that is asked in interviews everywhere.

My problem is that if I give a point between 1-6, then I will be considered very flame If I give myself points between 6-10, then I have to prove this, I am very good I rated myself 7 points in Interview

Interviewer asked me a question Write a program to Check whether a given point lies inside a triangle or not. I said very politely that sorry sir, I do not know the logic of this, so I cannot write the program. again interviewer asked a question Write Program for Fibonacci numbers

I got a little nervous because I didn't even know the logic then how can write program. I said Sir, if I know logic, then I can write the program I know the logic for embedded devices so I can write program for embedded device

He said that you have rated yourself 7 points, then you should able to write program.

Now I get nervous because I am not so good at maths I don't even have to write programs for no-tech problems. I understood communication protocol like uart i2c spi etc I can write programs only for embedded devices because I have spent my time on it.

What should be the answer to the question - How much do you rate yourself in C programming on the scale of 10?

#### WBahn

Joined Mar 31, 2012
26,033
How can anyone here know how YOU should rate YOURSELF?

Your answer to the Fibonacci question should have been something like, "I'm not familiar with Fibonacci numbers, could you please define them so that I know what you are looking for?" To this they might have said something like, "Each Fibonacci number is the sum of the prior two Fibonacci numbers, with the first two numbers being 0 and 1. I want you to write a program that outputs the Fibonacci numbers, one per line, up through and including the largest Fibonacci number that can be represented using whatever data type you choose and then stops."

If you can't take a description like that and confidently proceed to write a program to do it, then I would recommend not rating yourself anything above a 2, as a problem like this is usually given during the first half of a first course in C programming.

#### jpanhalt

Joined Jan 18, 2008
10,063
I am looking job for embedded engineer What should be the answer to the question - How much do you rate yourself in C programming on the scale of 10. This is a question that is asked in interviews everywhere.

My problem is that if I give a point between 1-6, then I will be considered very flame If I give myself points between 6-10, then I have to prove this, I am very good I rated myself 7 points in Interview

Interviewer asked me a question Write a program to Check whether a given point lies inside a triangle or not. I said very politely that sorry sir, I do not know the logic of this, so I cannot write the program. again interviewer asked a question Write Program for Fibonacci numbers

I got a little nervous because I didn't even know the logic then how can write program. I said Sir, if I know logic, then I can write the program I know the logic for embedded devices so I can write program for embedded device

He said that you have rated yourself 7 points, then you should able to write program.

Now I get nervous because I am not so good at maths I don't even have to write programs for no-tech problems. I understood communication protocol like uart i2c spi etc I can write programs only for embedded devices because I have spent my time on it.

What should be the answer to the question - How much do you rate yourself in C programming on the scale of 10?
I think you answered your own question. You were not a 7.

Did you not know what the Fibonacci series is? I would have stated that fact, then written the code if the interviewer described the series to me.

#### Fanfire174

Joined Mar 13, 2018
240
Your answer to the Fibonacci question should have been something like, "I'm not familiar with Fibonacci numbers, could you please define them so that I know what you are looking for?" To this they might have said something like, "Each Fibonacci number is the sum of the prior two Fibonacci numbers, with the first two numbers being 0 and 1. I want you to write a program that outputs the Fibonacci numbers, one per line, up through and including the largest Fibonacci number that can be represented using whatever data type you choose and then stops."
I am 100% agree with you I should have asked such a description Your advice is very useful.
An embedded engineer would be better than a C developer they were writing programs for embedded devices. same C developer would be better than a An embedded engineer if they were developing application for PC.

If an embedded engineer is asked to rate, on what basis he should give his rating ?

How can anyone here know how YOU should rate YOURSELF?
If I someone ask you How much do you rate yourself in C programming on the scale of 10. How will you rate yourself ?

#### WBahn

Joined Mar 31, 2012
26,033
I am 100% agree with you I should have asked such a description Your advice is very useful.
An embedded engineer would be better than a C developer they were writing programs for embedded devices. same C developer would be better than a An embedded engineer if they were developing application for PC.
It's not unreasonable to put qualifiers on the rating you give yourself to narrow the scope of applicability.

If an embedded engineer is asked to rate, on what basis he should give his rating ?
First, try to identify the scope that is relevant to the discussion. If you are interviewing for a position that is focused on embedded systems, then your rating should based on your ability to develop code for embedded systems. If your are interviewing for a job that is more general in nature, then you need to consider your skills, or lack thereof, in that more general arena.

Second, remember that your primary responsibility will be to solve other peoples' problems, so your answer needs to take into account everything from what you will be handed as a problem you are expected to solve all the way through to whatever form your part of the solution is expected to take.

If I someone ask you How much do you rate yourself in C programming on the scale of 10. How will you rate yourself ?
That's going to depend on context. If we are talking about developing console applications to solve technical problems that do not involve things such as network programming or multithreading, then I am going to be very near the top of that scale. But if you shift things and want me to develop GUI programs or do kernel programming, my rating will plummet precipitously, with the caveat that if that is what you need me to do, I am confident that I can move rapidly up that scale with minimal guidance and oversight while doing so.

#### 402DF855

Joined Feb 9, 2013
212
For those interviewer questions (triangle and Fib seq) the candidate should be allowed to google the algorithm and then write some code to demonstrate their skills.

I once contributed to evaluating candidates and my technique was to provide a short C program with intentional errors and have the candidate evaluate. One candidate found an error I hadn't intended. Nice!

#### bogosort

Joined Sep 24, 2011
470
If I someone ask you How much do you rate yourself in C programming on the scale of 10. How will you rate yourself ?
I'd first ask the interviewer, "What are examples of a 1, a 5, and a 10 on your scale?" Not only would this guide me to a more accurate self-assessment based on their criteria, it would show the interviewer that, as a good programmer, I clarify hidden assumptions before starting a task. Try to get your mind into "think like a programmer" mode while in the interview.

#### Fanfire174

Joined Mar 13, 2018
240
I have not yet understood what is the benefit to the interviewer by knowing the rating or why they ask such questions. Even when a recruiter a calls for a job, they also ask for the rating

@402DF855 , @WBahn You didn't answer rating. You did not say how much you rate yourself in c

#### 402DF855

Joined Feb 9, 2013
212
OK, out of 1 to 10, I'm an 11.

#### Fanfire174

Joined Mar 13, 2018
240
OK, out of 1 to 10, I'm an 11.
Then the interviewer would show you the way out, Just kidding

#### 402DF855

Joined Feb 9, 2013
212
Seriously, though, I've never been asked for a one to ten rating. I'd say you can expect to be asked about a language or toolset if you 1) have used it some, 2) used it a lot, 3) are an expert. So you'd pick one and be able to back it up with a description of your experience.

#### jpanhalt

Joined Jan 18, 2008
10,063
@Fanfire174
Just curious. When you got home, did you proceed to write code for either question (before reading this)? Can you post it?

#### WBahn

Joined Mar 31, 2012
26,033
I have not yet understood what is the benefit to the interviewer by knowing the rating or why they ask such questions. Even when a recruiter a calls for a job, they also ask for the rating

@402DF855 , @WBahn You didn't answer rating. You did not say how much you rate yourself in c

Nope. No one has ever asked me to rate myself on some ill-defined arbitrary scale. I've been asked to solve problems, or describe how I would proceed if given a particular problem, or to describe something that I've done in the past that highlights my skills in some way.

#### John P

Joined Oct 14, 2008
1,816
If they ask, "How do you rate yourself in C programming on the scale of 10?" then you should answer as WBahn would--"Well, if the number 10 has some importance here, there are 10 types of people in the world: those who understand binary, those who don't, and those who can work in any number base."

They'd hire you instantly.

#### MrChips

Joined Oct 2, 2009
21,618
From an interviewer's perspective I would rate the triangle and Fibonacci problems as trick questions.
You could still rate yourself a 10 in C programming and still not know how to code those two problems.
The interviewer should be looking at how you go about solving the problem.

What is the problem?
What is a possible algorithm to solving the problem?

I would hire someone primarily based on their problem solving skills, not their knowledge or their ability to write a program correctly in C.

#### MrChips

Joined Oct 2, 2009
21,618
Thinking about it a second time, the problem of determining if a point is within a triangle is an interesting problem. I will come back to that later.

The first question: How would you rate yourself in C programming on a scale of 10?
This is a strategic and psychological test in itself without having to ask you to prove your skill at C programming.

0
1, 2, 3
4, 5, 6
7, 8, 9
10

Consider the subtle meaning in any of these answers from a psychological perspective, for example, honesty, confidence, self-awareness.
There's a lot of food for thought hidden here.

#### WBahn

Joined Mar 31, 2012
26,033
Thinking about it a second time, the problem of determining if a point is within a triangle is an interesting problem. I will come back to that later.
Just thinking off the top of my head and a quick sketch on paper (and assuming we are talking about plane geometry), I think it is pretty straightforward.

If you take the cross product of the vector of one side and the vector from the first point on the side to the point in question, then the vector is either out of the page or into the page, depending on the sign of the z-axis component. That determines whether the point is to the "left" or "right" of that side of the triangle. If you go around the triangle in a consistent direction then the point is in the triangle if it is on the same side of each of the triangle's sides.

So if we have a triangle defined by the points <x1,y1>, <x2,y2>, and <x3,y3> and a point <x,y>, we would have

z1 = (x2-x1)(y-y1) - (y2-y1)(x1-x)

Similar equations for z2 and z3.

If all three have the same sign, the point is in the triangle.

We can tell if z1 and z2 have the same sign by seeing if z1·z2 is non-negative. We can then do a similar check on z2·z3. If both of these quantities are non-negative, we are good.

If we are talking about three dimensions, then I think you can extend this pretty easily by saying that "inside" refers to whether the point is inside the right cylinder defined by the triangle's sides in the plane of the triangle. What I'm not sure about with the image I've visualized in my head is whether you can reduce that to a simple test on the cross-products already mentioned or whether you have to project them onto the of the triangle (which should be pretty easy to do if you have to).

#### MrChips

Joined Oct 2, 2009
21,618
Exactly. And the solution has nothing to do with one's ability to program in C.
One can have zero knowledge of C programming and still be able to solve the problem.
On the other hand one can rate oneself at 10 in any programming language and still not able to solve the problem.

#### WBahn

Joined Mar 31, 2012
26,033
Exactly. And the solution has nothing to do with one's ability to program in C.
One can have zero knowledge of C programming and still be able to solve the problem.
On the other hand one can rate oneself at 10 in any programming language and still not able to solve the problem.
I have no idea how this interview was conducted and so it's impossible to say if it was structured in a rational way. Programmers, like engineers in general, are paid to solve other peoples' problems and that usually involves applying skills in the area of expertise to problems that are based outside that area of expertise. It's completely reasonable for an interviewer to want to get a feel for a candidate's ability to apply their skills to solve problems that they are not already familiar with. Just seeing how they go about trying to deal with it is very informative. Do they mumble something about it being so long since they did that in school, or do they start asking questions to figure out just what is being asked for? Do they just declare that they don't know how to do it, or do they start trying to come up with some approach, not matter how futile in the end, that at least tries to address some aspect of the problem?

For example, with the triangle problem, did they even take a sheet of paper and draw a triangle and put a point on the paper somewhere and start trying to consider different ideas of how they might go about it? Were they willing to simplify the problem to something that they could come with a solution to as a special case? Were they willing to try to ask questions to better understand the problem from the person that gave it to them? Or was it fairly evident that they would only be able to, perhaps, implement someone else's solution that was given to them on a silver platter?

#### jpanhalt

Joined Jan 18, 2008
10,063
Regarding my post #12, to which the TS has not replied, I do not think either question was a trick question. Moreover, the TS's response to the triangle question led to the second question. Programming the Fibonacci series should be trivial. Programming in C was apparently a skill he was supposed to have, and it is fair game to ask any applicant to demonstrate his skills. I don't blame the interviewer for asking for an example of the interviewee's ability to program a simple problem.

If he didn't know what the series was, he should have asked. His response was more to the effect of, "If you give me a flowchart, I can put it into code." That is not what a problem solver would say. Apparently, he didn't get that job, and now it's water under the bridge.

The point of my question in #12 was not to beleaguer what his answer should have been, but to find out whether he did anything to fix that deficiency once he was out of the interview. In other words, failing an interview or even one question on an interview should be a learning experience. If he came back for a second interview, I would ask him the same questions again. Has he learned anything from that interview except for posting his question on AAC.