7 C# interview questions [that weed out the losers!]
-
Dave M Bush[^]:
So, once again, the place I am currently working has been interviewing for some more programmers and we’ve had to laugh at some of the answers we’ve received on some pretty simple question.
"Soy un perdedor, I'm a loser baby"
-
Dave M Bush[^]:
So, once again, the place I am currently working has been interviewing for some more programmers and we’ve had to laugh at some of the answers we’ve received on some pretty simple question.
"Soy un perdedor, I'm a loser baby"
The potential programmers surely didn't read the "Interview questions on XXX" row of articles here...
M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
-
Dave M Bush[^]:
So, once again, the place I am currently working has been interviewing for some more programmers and we’ve had to laugh at some of the answers we’ve received on some pretty simple question.
"Soy un perdedor, I'm a loser baby"
I'm surprised he made a few errors that I would expect junior devs to make, but not senior ones, especially ones commenting about how people interviewing for them couldn't answer some of these correctly.
Quote:
What is the difference between the keyword “String” and the keyword “string”?
"String" (capitalized S) isn't a keyword, it's a class/type name.
Quote:
A the value of a value type occupies memory on the stack and when you do an assignment from one value type to another the data is copied from one memory location to the other. Each variable is changed in isolation to the other. A reference type is a variable on the stack that points to memory in the heap that actually holds the value. When you do an assignment from one reference type to another, only the pointer is copied. In the end, both variables point to the same location on the heap.
A value type does not necessarily go on the stack - it can be allocated on the heap (as value-type member fields of a class are), or in a register (as the jitter determines is best). This is one of the most common incorrect statements I hear made in C#, and for some reason is a very common interview question. Additionally, the pointer/reference (or "variable" as he calls it) to the "reference type" object is also not necessarily stored on the stack.
-
I'm surprised he made a few errors that I would expect junior devs to make, but not senior ones, especially ones commenting about how people interviewing for them couldn't answer some of these correctly.
Quote:
What is the difference between the keyword “String” and the keyword “string”?
"String" (capitalized S) isn't a keyword, it's a class/type name.
Quote:
A the value of a value type occupies memory on the stack and when you do an assignment from one value type to another the data is copied from one memory location to the other. Each variable is changed in isolation to the other. A reference type is a variable on the stack that points to memory in the heap that actually holds the value. When you do an assignment from one reference type to another, only the pointer is copied. In the end, both variables point to the same location on the heap.
A value type does not necessarily go on the stack - it can be allocated on the heap (as value-type member fields of a class are), or in a register (as the jitter determines is best). This is one of the most common incorrect statements I hear made in C#, and for some reason is a very common interview question. Additionally, the pointer/reference (or "variable" as he calls it) to the "reference type" object is also not necessarily stored on the stack.
Yep... You missed one more:
Quote:
Overloading gets at the concept that you can have multiple methods with the same name hanging off a given class as long as the methods all return the same type and have a different signature, the code is legal.
Overloaded methods don't have to return the same type.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
Dave M Bush[^]:
So, once again, the place I am currently working has been interviewing for some more programmers and we’ve had to laugh at some of the answers we’ve received on some pretty simple question.
"Soy un perdedor, I'm a loser baby"
Questions like this are quite common but also very poor aren't they? What are the problems we face as everyday devs? Rubbish like long pieces of spaghetti (trying to debug right now). General poor readability and maintainability. Hardly anyone asks about such things at interviews!
Kevin
-
Dave M Bush[^]:
So, once again, the place I am currently working has been interviewing for some more programmers and we’ve had to laugh at some of the answers we’ve received on some pretty simple question.
"Soy un perdedor, I'm a loser baby"
I think an interviewer should not value questions that only take a few minutes to learn, but he should focus on skills that take years to acquire, or are connected to your personality. -Chunk down complex problems. -Think and act methodically. 'How do you use internet'. 'what's the best/worst thing about the job.' 'What are your current goals.' 'What's the last thing you've learned as a programmer.' If someone doesn't know the terminology, doesn't mean he/she doesn't know the pattern. He might have figured out those patterns out by himself without knowing the name, or that there's a name for it.
.