This site is 100% ad supported. Please add an exception to adblock for this site.

.Net/SQL Interview Questions

Review for job interviews - mid to senior level .Net/OOP/SQL/ASP.NET programmer. WARNING: These are my answers... no guarantee they are correct, although I've done my best! I compiled these questions based on actual questions I was asked in my job search (Dec. 2007) - it was amazing how some of these stumped me the first time I heard them, then came to me a half hour later... this review will help in those cases. I suggest not just "memorizing" these answers to do well in an interview! Be honest, get a job where you fit! One note: I was not asked questions marked with "**"... I included them because I think they are important and would ask them of someone I interviewed.

Terms

undefined, object
copy deck
**OOAD: What are 2 good strategies to follow when creating designs that deal with variations
1. Find what varies and encapsulate it. 2. Favor aggregation over inheritance.
OOP: What's the difference between a struct and a class
A struct is an unchanging data structure (immutable), while a class can contain properties whose values change and methods that perform actions.
OOP: What is polymorphism
When a child object can override the parent class's method, and achieve a different result than a sibling object.
**OOAD, UML: What are the different relationships possible between classes in class diagrams
1. The "is-a" relationship: one class is a kind of another class (inheritance, signified by a triangle) 2. The "has-a" association, one class contains another class (composition, signified by a solid diamond, or aggregation, signified by an open diamond). 3. The "uses-a" relationship (also, dependency, signified by dotted line with arrow) 4. The "creates-a" relationship (signified by "I can't remember").
HTML: Which tag is used to render a drop down list
The "select" tag (with "option" tags inside).
Javascript: What are some things you would use event programming in Javascript for
To trigger code on keyboard events, to trigger behavior on mouse events or when a control's value is changed.
C#: What is the "yield" operator
Used in an iterator block (example, foreach) "yield" returns a value to the iterator object.
OOP: What is an immutable object
An object that does not change (for example, a struct).
ASP.NET: What is the file global.asax used for
It is a file in the IIS application root that holds application-level methods and properties. Properties set in the global.asax file are available across all page requests or browser sessions of an ASP.NET application's life.
C#: What is the "lock" operator
It is used to mark a section of code that should only be used by one thread at a time.
SQL: What is the difference between an inner and outer join
Inner joins show the intersection of 2 recordsets, outer joins show the union.
ASP.NET: What are the different ways to save the state of a program in ASP.NET
Application state, Session state, View state.
C#: Why would you use three forward slashes "///"
This is a C# compiler feature for its XML documentation system... it indicates a single line comment. Double slash also comments out a line, but is ignored for the XML docs.
SQL: What are the purpose of "locks" in a DBMS
To resolve conflicts caused by multiple agents concurrently updating and reading data. Example lock-types in SQL server are "Shared", "Exclusive" and "Update".
SQL: What is the difference between a clustered and non-clustered index
A clustered index is faster, but takes more resources to set up. The index points to blocks of physical data, AND the data within the blocks are ordered in the same way as the index, saving search time. Non-clustered indices point to blocks of physical data that are unordered and must be searched.
ASP.NET: What is the difference between a user control and a server control
A server control emits HTML using a class library (for example, custom Repeater)... a user control is implemented as an ASCX file.
OOP: What is the difference between overriding and overloading
Overloading is used to implement a method or operator in different ways, based on the type of object it is being called by. Overriding is used to re-implement a method in an inherited class so that it provides different functionality (polymorphism).
OOP: How is an interface different from an abstract class
An interface contains only the signatures of properties and methods and must be implemented within any class that inherits from that interface. An abstract class contains property and method implementations, which may be overridden by child classes.

Deck Info

18

permalink