Feeling worried or hesitant with your first interview at a software house? Worried if you might not be able to ans questions asked by the interviewer? Worry no more. In this article I'll be covering some of the questions asks by the interviewers about C# and .Net. Lets start straight away with the questions.
Question 1: One of the most common question asked is what is IL? And the common answer given is It is intermediate language which is not quite the right answer. The answer given by you should be that Intermediate code is partially compiled or half compiled code.
Question 2: After that answer, another questions comes right away is that Why is it half compiled? The subtle answer for this question is IL code is half compiled so compiler can be able to figure out the system, hardware and configs in order to give optimal code for that environment.
Question 3: Who compiles this IL code? JIT (Just in time) compiles the IL code.
-Per file (complete C# file)
-Per Method/Function
-Per fragment
Question 4: How does JIT compile the IL code? JIT compiles in 3 ways:
-Per file (complete C# file)
Question 5: How many types of JIT are there? There are 3 types of JIT
Normal JIT: It is a Dynamic compilation and compilations is done on demand bases. Compiled code is stored in Cache, Ram.
Econo JIT: It is a Dynamic compilation and compilations is done on demand bases. Same as Normal JIT but Compiled code is not stored in Cache, Ram. Better for smartphones with low memory.
Pre-JIT: It is not a dynamic compilation. It can be done by running Ngen.exe. It will compile all the .net code in machine language.
Question 6: Where is Ngen located? Ngen resides in framework directory.
Question 7: How can we force the compiler to use which JIT? You cant force, it is done
internally. Econo JIT is used when less memory is available.
If memory is available, it will use normal JIT.
These were some of the questions that are usually asked by the interviewer. Now you are able to answers these questions without a problem!
Comments
Post a Comment