Showing posts with label For MS Interview. Show all posts
Showing posts with label For MS Interview. Show all posts

Technical SQL Questions:

  1. What are the three different types of replication and how does replication work?
  2. What is the purpose of log shipping and how does it work?
  3. What is the difference between a clustered and a non clustered index?
  4. What is a derived table and when would you use one?
  5. What is a VIEW? How to get script for a view?
    View is virtual table based on record set of select statement. View cantain the field from on one or more than one table's fields. The using view we can use JOIN and where statement and IT' s looks like single table .
    Ex:- Create View view_name AS SELECT Column(s) from TABLEname where Condition
    If we have several tables in a db and we want to view only specific columns from specific tables we can go for views. It would also suffice the needs of security some times allowing specfic users to see only specific columns based on the permission that we can configure on the view. Views also reduce the effort that is required for writing queries to access specific columns every time.
  6. What is a "trigger"?

    Triggers are stored procedures that database should take action when relevant event occur
    In other word we can say trigger are stored procedure that fire when a relevant event occurs such as insertion , deletion, update
  7. What is a "transaction"? Why are they necessary?

    Transactions are an atomic piece of instructions in SQL which have to be executed all or none.The word atomic signifies the all or none character of a transaction.
  8. How to remove duplicate records from a table?

    delete from emp where en not in (select min(en) from emp order by columnname)
  9. How will you copy the structure of a table without copying the data?

    select * Into NEWTABLE from OLDTABLE where 1=2
  10. What is a Stored Procedure? - Its nothing but a set of T-SQL statements combined to perform a single task of several tasks. Its basically like a Macro so when you invoke the Stored procedure, you actually run a set of statements.
  11. Can you give an example of Stored Procedure? - sp_helpdb , sp_who2, sp_renamedb are a set of system defined stored procedures. We can also have user defined stored procedures which can be called in similar way.
  12. What is an Index? - When queries are run against a db, an index on that db basically helps in the way the data is sorted to process the query for faster and data retrievals are much faster when we have an index.
  13. What are the types of indexes available with SQL Server? - There are basically two types of indexes that we use with the SQL Server. Clustered and the Non-Clustered.

  1. What are the basic difference between clustered and a non-clustered index? - The difference is that, Clustered index is unique for any given table and we can have only one clustered index on a table. The leaf level of a clustered index is the actual data and the data is resorted in case of clustered index. Whereas in case of non-clustered index the leaf level is actually a pointer to the data in rows so we can have as many non-clustered indexes as we can on the db.
  2. When do we use the UPDATE_STATISTICS command? - This command is basically used when we do a large processing of data. If we do a large amount of deletions any modification or Bulk Copy into the tables, we need to basically update the indexes to take these changes into account. UPDATE_STATISTICS updates the indexes on these tables accordingly
  3. Can you tell me the difference between DELETE & TRUNCATE commands? - Delete command removes the rows from a table based on the condition that we provide with a WHERE clause. Truncate will actually remove all the rows from a table and there will be no data in the table after we run the truncate command.
  4. Can we use Truncate command on a table which is referenced by FOREIGN KEY? - No. We cannot use Truncate command on a table with Foreign Key because of referential integrity.
  5. What is the use of DBCC commands? - DBCC stands for database consistency checker. We use these commands to check the consistency of the databases, i.e., maintenance, validation task and status checks.
  6. Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.
  7. What command do we use to rename a db? - sp_renamedb ‘oldname’ , ‘newname’
  8. What is a Join in SQL Server? - Join actually puts data from two or more tables into a single result set.
  9. Can you explain the types of Joins that we can have with Sql Server? - There are three types of joins: Inner Join, Outer Join, Cross Join
  10. What is a Linked Server? - Linked Servers is a concept in SQL Server by which we can add other SQL Server to a Group and query both the SQL Server dbs using T-SQL Statements.
  11. What are the OS services that the SQL Server installation adds? - MS SQL SERVER SERVICE, SQL AGENT SERVICE, DTC (Distribution transac co-ordinator).

Testing Scenarios

Test a Vending machine?
· I’ll try to test it with different coins of the same currency and I’ll see if it gives change back.
· I’ll try to test with different currencies.
· I’ll try to put a fake input coin and see how it reacts to it
· I’ll try to press the menu button before inserting coins.
· I’ll try to press two menu buttons simultaneously.
· I’ll try to press and hold the menu button after I put a coin
· I’ll try to open the door
· I’ll put two coins one after the other before pressing any button and I’ll try to get two items. I’ll try to test if it can manage tasks and etc.
· I’ll test it by putting coins and pressing item button at the same time and I’ll see how it reacts
· I’ll put an item which has a size greater than the hole size of the vending machine and I’ll try to buy that product and If it doesn’t work I’ll try to buy another product, here I’ll try to see if the bigger one blocked the way.
· I’ll flip it up side down and see if it can give me certain item.
· I’ll disconnect the power cord after I put coins and connect it again and press the button and see if it can handle the request which was in the process before the power failure.
· I’ll try to test it if it can operate with different power supplies like main supply and generator etc.
· I’ll try to test its compatibility with the environment.

How would you design the lights at a traffic intersection?

See how creative they are. In particular, synchronizing with lights at other intersections, how they provide smooth flow of traffic (turns etc). Do they consider traffic patterns (rush hour/ special event/ emergency vehicles)?
Solution

There are so many processes to consider these are as follows
· Serving traffic moving straight from east to west
· Serving traffic coming from east and turning to the right at the intersection
· Serving traffic coming from east and turning to the left at the intersection
· Serving traffic moving straight from west to east
· Serving traffic moving from west and turning to the right at the intersection
· Serving traffic coming from west and turning to the left at the intersection
· Serving traffic moving straight from north to south
· Serving traffic coming from north and turning to the right at the intersection
· Serving traffic coming from north and turning to the left at the intersection
· Serving traffic moving straight from south to north
· Serving traffic coming from south and turning to the right at the intersection
· Serving traffic coming from south and turning to the left at the intersection

TEST CASES FOR TESTING A TOSTER?
Does it handle all common types of breads.
Does it perform toasting well.
I’ll try to examine the performance by repeatedly using a tester and I’ll try to see if the performance degrades through repeated use.
I’ll try to test it with different kinds of bread, pizza slice, cracker type bread, flat bread, bread with high sugar content, very thin,medium,and thick
I’ll turn the taster on for a long time without putting any bread in it and see what happened. Here I’ll try to check if it has a certain controlling mechanism if the temperature is above a certain limit.
I’ll test it with for chemical reaction when it is in contact with a certain chemical.
I’ll test it with different power supplies.
I’ll test its reaction with the environment(like does it generate a certain gas which is harmful to the environment)
I’ll try to adjusting all the controls while operating and see every control produces the required result.
I’ll try to see if there is an electric shock when we touch the body of the toaster.
I’ll put more bread than it can accommodate and I’ll see what happens
I’ll try to flip it on side position and see whether it works well or not.
I’ll put a Frosted bread and see what is going to happen.
I’ll turn the toaster on until it gets very hot and then turn it off and put some bread to toast and see how it handles it.
I’ll try to discover which parts of the toaster to touch when in operation.
Should work with diffent voltage ranges(considering internationalization)


Given a screen with customer name, address, phone number, date of birth, SSN, and functions like ADD, DELETE, UPDATE, what types of tests would you execute (backend and GUI)?

GUI Testing:
· I’ll insert a proper data on each field and press add button.
· I’ll select a certain record and delete it.
· I’ll select a certain record and edit some fields with valid data and press update button.
· I’ll press the add button with out entering data in all fields.
· I’ll press the delete button with out selecting a particular record and see what happened.
· I’ll press the try to update without selecting a particular field.
· I’ll try to add an already existing record and see what happened.
· I’ll try to add a certain data in which certain fields are left.
· I’ll try to add data with long strings for each field.
· I’ll try to add data which is in different language and see what happened.
· I’ll try to add data which has a space or some special characters.
· I’ll try to add data which is inconsistent like negative ssn,birth date which is in the feauture, phone and address which is not valid,
· I’ll try to delete a certain record which doesn’t exist.
· I’ll try to update with out changing any value.
· I’ll try to update a record which doesn’t exist
· I’ll try to update a certain record with empty fields all.

DATABASE TESTING:
· I’ll check to see if a certain record has added to the database after I pressed add button.
· Check to see the performance by adding a record repeatedly in a fast manner.
· I’ll try to add so many records and I’ll see if disk space is a constraint
· I’ll try to delete a record which doesn’t exist and see how the Database reacts to this
· I’ll try to update a certain record with out making any changes.
· I’ll try to update a certain record with an invalid data.
· I’ll try to delete a record from an empty table int that particular database.
· I’ll try to see network failure while performing database operations.
· I’ll try to check how the database handles when I try to put duplicate records.
· I’ll try to execute the above GUI from so many client locations and see if there is a possibility of memory leakage.
Testing Enter File Name Text box of a dialog box
· I’ll try to save the specified file with out specifying a name
· I will try to put a certain specific length character and save it using a save button
· I’ll try to enter a file name consists of only numbers.
· I’ll try to enter a file name which will start with dot.
· I’ll try to enter a file name which is already existed.
· I’ll try to insert different combination of special characters and try to save it.
· I’ll try to enter a very long character equal to the maximum number of the characters that the text box accommodate and try to test it.
· I’ll enter a certain file name and click a cancel button.
· I’ll enter a file name which has a space in between words
· I’ll enter a file name which has only spaces.
· I’ll enter a directory name and try to save it and see what happened.
· I’ll enter a file name which exists but holds a different data format.

Test a clutch pencil
· I’ll try to sharpen a regular pencil
· I’ll try to sharpen diffent pencil which are made up of different materials for example hard, soft wood…etc
· I will try to put a pencil inside a hole with out pressing the clutch
· I will try to sharpen another material which has the same shape as a regular pencil
· I will try to sharpen a pencil by rotating the arm in opposite direction than the usual
· I’ll try to see the material composition is it hazardous if it is put in some chemical, is it going to burn.
· I’ll try to see the strength of the material by placing a high load.
· Does it need some safety precaution for children to use it.
· Is it continue to work if one of its components is failed like the arm,clutch or blade…etc
· Does the blade and other metal parts rest if it is stored in a frosted environment.

Test An Elivator?
· I’ll try to load an elevator with some rated load specified by the manufacturers
· I’ll try to load it with a heavy load which is much much greater than the rated load.
· I’l l see how it reacts when it’s not loaded.
· I’ll try to disconnect the main power supply while the elevator is working with a certain load and see what happened.
· I’ll try to call the elevator from a certain floor and by pressing both up and down arrow.
· I’ll try to open the door of the elevator manually and see what happened.
· I’ll try to disconnect the elevator and it’s controlling part and see what happened.
· From the inside of the elevator I’ll try to press a floor number button which is the same as where the elevator is
· From inside I will press and hold the open door button and see what happened.
· I’ll try to open the door manually from inside and see what happened.
· I’ll see when the final destination of the elevator is if it’s not called or loaded.

C# screen KEY

1. What is the name of the entry point function for all C# programs?

Main()

2. The C# data type int is a synonym for what CLR data type?

System.Int32

3. In C# all primitive data types and user defined data types inherit from what super object?

object

4. How is the C# string class use of == different from all other classes?

When you compare two strings with == you are actually using an overloaded version that compares the characters in the strings instead of the reference values of the two strings. So, if

string s1 = "cat";

string s2 = "cat";

Then the expression s1 == s2 returns true even though s1 and s2 point to two different objects.

5. What encoding does C# use for characters?

Unicode (16-bit)

6. What is the difference between the C# "ref" and "out" keywords when applied to method parameters?

Use "ref" when the parameter/argument has a value but the method changes it. Use "out" when the parameter/argument does not have value and the method supplies it.

7. What are the C# "checked" and "unchecked" keywords used for?

To control whether arithmetic overflow throws an exception (checked) or truncates bits (unchecked).

8. What is the difference between a C# "using" directive and a C/C++ "#include" directive?

A "using" does not add any code to the program it just tells the compiler where to find a namespace. The "include" actually adds code.

9. What is the difference between a C# struct and a C# class in terms of reference types and value types?

A struct is a value object and class is a reference object.

10. Besides "public" and "private", what other two access modifiers can a C# class take?

"protected" and "internal"

11. Why does C# use class destructors far less often that C++?

C# uses the GC (Garbage Collection) mechanism.

12. In C#, are static methods accessed through a class name, an object name, or both?

Class name only.

13. How do you make a C# class abstract (when you want to inherit from it but never implement it directly)?

Use the "abstract" modifier keyword.

14. How do you prevent a C# class from being used as a base class (inherited from)?

Use the "sealed" modifier keyword.

15. C# does not support multiple inheritance. What C# mechanism allows you to have a semblance of multiple inheritance functionality?

Interfaces

16. What are the two kinds of C# properties?

get and set

17. Syntactically, what is the difference between calling a method and a property?

Methods require parentheses, properties do not use parentheses.

18. What is the approximate C# equivalent to a C++ function pointer?

delegate

19. What C# keyword do you use to implement a variable length argument list?

params

20. In C# if you must use pointers, how do you do it?

Use the "unsafe" keyword.

WINFORMS:

  • Which properties on a Windows Forms Control allow you to control it's layout? (Answer: Docking and Anchoring)
  • What method do you call on a Windows Forms Control or drawing object when you are done using it (Answer: Dispose)
  • When will an object be eligable for garbage collection? (Answer: when no other objects are referencing it)

1. How many SQL database tables are required to track the following info?

Customer

Purchase order number

Purchase order date

Purchased items

Purchase price for each item

Assuming that:

Same customer can make multiple purchases on different or same dates

One purchase order can contain multiple items

All items have specific item numbers

Solution: three tables;

Customer table – that will contain customer’s information like address, …

Items table – that will contain product type, manufacturing company, expiration date, …

Order table – that will contain item number, customer id, quantity ordered, date of purchase …

2. Generate all possible test scenarios and test cases to test a pencil sharper

Solution:

I use new pencils and check whether the machine sharpens well or not.

I use a used pencil with core too short that needs re-sharpening and check whether the machine sharpens well or not.

I use pencils with cores of different core size but same material and see how fast the machine will sharpen.

I use the machine continuously for a long period of time and check whether the blade gets blunt quickly or not.

I will check how long will it take for the chipping container filled to capacity and see the impact on its usage.

I will check how economical is the sharpener. Does it chop muck core? …

I push the pencil and see how resistant is the machine. I will check whether it shatter or break the exposed core entirely and check whether the impact be mitigated or not.

I will try sharpening with a clean piece of paper spread before me and check whether litter the place with chopped pieces of black core and other chippings or not.

I will check whether the machine is easy to use or not. I will check whether its sharpening blade is well covered or not.

I will check the protection /security mechanisms –

Protection from theft,

Whether I can protect unauthorized users from using or harm it.

3. What's the difference between a Queue and a Stack? What data structure would be used implement a Stack and a Queue.

Solution:

Difference between a Queue and a Stack:

A stack is a list in which deletion and insertion of elements can occur only in one designated position called the top of the stack. It applies LIFO (Last in first out manipulation of insertion and deletion of elements). The right most element is the top of the stack.

Queue is a list in which elements are added to the rear (enque) and removed from the front (dequeue). It applies FIFO (First in first out manipulation of insertion and deletion of elements).

We use a linked list data structure to implement any of the two efficiently.

4. What's the big O order of binary search?

Solution:

Order of ( log N) – where the logarithm is in base two.

Screening Questions

C

1. What is array indexing?

It’s the ability to access a specific position in an array using the notation ‘array[i]’ where ‘i’ is the offset into the array being accessed.

2. List the different access modifiers available:

public, protected, friend, private

3. What does it mean to pass a parameter ‘by value’?

The value being passed will be a copy of the original value, so any changes made inside the function will not be persisted once the function call terminates.

4. What are default arguments?

Parameters that are assigned a default value if no parameter was passed.

5. Can structures have methods?

Yes


6. What is the ‘Ones complement’ operator used for?

It’s used to return the inverse of the bits of variable. (the ‘~’ (tilde) operator).


C++

1. When do pre and post increment and decrement operators get evaluated?

Pre-increment and pre-decrement operators are evaluated before the line of code being processed is evaluated. Post-increment and post-decrement operators are evaluated after the line of code being processed is evaluated.

2. How do you dereference a pointer in C++?

Use the asterisk operator. You can also use the arrow ‘->’ operator on a class pointer to get at the value the pointer is pointing to.

3. What is the difference between a class and a struct?

A class has all of its members declared as private by default. A struct has all of its members declared as public by default.

4. What is the difference between function overloading and function overriding?

Function overloading is where you have the same function name, but different parameters. Function overriding is where you have the same function signature (same name and parameters) in a derived class that overrides the functionality or behavior in the parent or base class.

5. What is an interface?

An interface defines a contract stating that any class that inherits the interface guarantees that all functions defined in that interface will be implemented. It’s a class that has all of its functions declared as pure virtual, i.e. all functions are set equal to 0.

6. Why are virtual destructors needed?

To prevent memory leaks due to base class destructors not being called.

7. What do the first four bytes of a class object point to?

They point to the VTABLE (virtual table), a table of pointers to virtual functions and is needed to support dynamic binding (polymorphism).




C#

1. What is the keyword used to reference a namespace in your file?

The ‘using’ keyword

2. What are the different access modifiers available in C#?

Public, Protected, Internal, Protected Internal, and Private

3. What are delegates?

Delegates are the equivalent of function pointers in C/C++ but with the added benefit of being type safe, and are used to call functions when an event is fired.

4. How do you declare a class so that no one can inherit from it?

Use the ‘sealed’ modifier

5. What is the difference between a value type and a reference type?

Value types are stored on the stack and reference types are stored on the heap. Value types are primitive data types such as int, char, and float. Reference types are data types such as class, interface, event, and delegate.

6. What is the ‘lock’ statement used for?

A lock is like a “critical section”. It serializes access to a block of code, preventing multiple threads from concurrently accessing data within that block of code.

7. What are the benefits of using a thread pool?

There is a lot of overhead associated with creating and destroying large numbers of threads. Using a thread pool allows the CLR to avoid this cost of creating a new thread by storing completed threads in a ‘thread pool’ in a suspended state for future use. The next time the application makes a request to create a new thread, one of the suspended threads in the thread pool will wake up and perform the task.


XML

1. Can a valid XML file have more than one root?

No

2. What is XSL?

A language for specifying style sheets for XML documents.

3. What is a DTD?

A DTD is a document type definition file. It defines the rules for an XML document that specify which elements (the markup tags) and attributes (values associated with specific tags) are allowed in an XML that uses the DTD.

4. What is a URI?

A URI is a Universal Resource Identifier. They are simply formatted strings which identify -- via name, location, or any other characteristic -- a resource on the web such as WWW addresses, Universal Document Identifiers, and the combination of a Universal Resource Locator (URL) and Universal Resource Name (URN).

5. What is XSLT?

XSL Transformation. It is used with XSL to describe how an XML document is to be transformed into another document such as an XML document or an XHTML document.

6. What is the XSLT element that loops through each node in a specified node set?

The ‘for-each’ element.

7. What is the purpose of the ‘match’ attribute?

The match attribute is used to associate a template with an XML element. By matching on a “/” (forward slash), the root, you can define a template that will match on the entire XML document.


SQL-DBE

1. What does SQL stand for?

Structured Query Language.

2. What is an index?

Indexes enable quick access to data in a table if the fields in the “WHERE” clause match the index.

3. List the different joins available in SQL?

Inner, left outer, right outer, full outer, self join, and cross join (a.k.a. Cartesian join)

4. What is a view?

A view is used to filter out and control access to data in a database, limiting the results to only those needed for the transaction to complete.

5. What is a transaction?

A collection of SQL statements that are treated as a single unit of work, and that are either committed in their entirety or non at all via a roll back.

6. What is a page split?

Page splits cause table fragmentation. When data is to be inserted into a page that doesn’t have enough space to accept it, the page is said to ‘split’. Splitting is where a new page is created and half of the data on the original page is moved to the new page before the new data is to be inserted. i.e. if the data to be inserted will make the page exceed it’s 8KB (kilobytes) of data, the page will split.

7. List the different isolation levels supported by SQL?

Read Uncommitted, Read Committed (default), Repeatable Read, Serializable


SQL-DBA

1. What is an execution plan?

It’s a compiled set of SQL statements. You can view the execution plan using Query Analyzer.

2. How do you know what fields to create an index on for a particular query?

You should create an index for all fields referenced in the ‘WHERE’ clause and any fields that are used in any joins.

3. List the different recovery models SQL supports?

Simple, Full, and Bulk Logged

4. If you did a full backup on Sunday, a differential backup on Monday, Tuesday, and Wednesday, and then Thursday you lost your SQL server, what would you have to restore and in what order to get back to the most recent point in time?

You would have to restore Sundays full backup followed by restoring the most recent differential, which was Wednesdays. If you were doing any transaction log backups between differentials, you would restore all transaction log backups since your most recent differential.

5. What is a page fault and how can you monitor it?

A page fault is an exception that is thrown when an application accesses a piece of memory that has been temporarily moved out to disk. When a page fault occurs, the system has to move that memory back into the system RAM so that the application can continue. A large number of page faults are at indication that the system is running out of system memory, resulting in the system paging out large amounts of memory to disk. To monitor it, you can use PerfMon (performance monitor) to view the page fault system counters. You can also use TaskMan (Task Manager) to get a summary of system page faults.


HTML/DHTML

1. What is the difference between a

and a ?

Both are used to label and apply styles to a section of HMTL. The difference is that a

inserts a paragraph element at the end of the
section where as a does not.

2. What is the tag used to insert a picture in to your page?

The tag.

3. Where does the class for an HMTL element get defined?

In a stylesheet (CSS). It can also be defined in the page itself.

4. For client side only, how would you accomplish popping up a window to the user on mouse over of an element on the page?

Generally use a div tag, and hide the div tag on load until they do a mouse over.

5. How do you associate a JavaScript function to an tag so that when the user hovers over the image, it’ll call the function?

You need to include the OnMouseOver event handler element in the tag and set it equal to the name of the function you want it to call.

6. What is the ‘base’ object used for?

The base object specifies an explicit URL used to resolve links and references to external sources such as images and style sheets.

7. What object contains information about the browser?

The ‘navigator’ object.


ADO.NET

1. What is a DataReader?

A DataReader is a connected results set, meaning you have to stay connected with the server for the entire time you’re accessing data through it. It’s forward only and read only, but has the advantage of being much faster and more efficient then using a DataSet.

2. What is a DataSet?

A DataSet is a disconnected results set and can contain multiple tables and relationships between the tables. You can update the data in the tables as well as move forward and backward through it.

3. What are the three most common execute statements of the SQLCommand class?

ExecuteNonQuery(), ExecuteScalar(), ExecuteReader()

4. What are the classes needed to bind data in a SQL database to a DataGrid control?

SQLConnection, SQLCommand, SQLDataAdapter, DataSet or a DataReader, and a DataView if desired. You’ll then bind the DataSource property of the DataGrid control to either your DataSet or DataReader.

5. What is the drawback of building a SQL statement dynamically using user input?

SQL Script Injection. It’s possible for a user to put “inject” his or her own SQL code into the query and hijack the server.
ASP.NET

1. What is the difference between server side and client side code?

Server side code is compiled and executed on the web server, rendering HTML and JavaScript out to the client to be viewed in the client’s browser. Client side code, like JavaScript and VBScript, is executed on the client’s machine within the client’s browser for the purpose of improve the user experience.

2. What is the method used to convert a string to safe HTML that can be rendered to the client?

HTMLEncode()

3. What is the method used to convert a string to be URL compliant?

URLEncode()

4. What does the EnableViewState property do?

It indicates whether the page maintains its view state and the view state of any server controls it contains when the current page request ends.

5. What is the difference between Server.Transfer() and Response.Redirect()?

Server.Transfer() occurs on the server and is used to transfer a user to another page on the same server, allowing the URL and form data to be preserved. Response.Redirect() is used to redirect a users browser to another web server but does not preserve the form data.


SDET

1. What is test automation?

Test automation is the use of software to automate the control and execution of tests cases for use in monitoring test efforts as well as in generating statistics to compare actual outcomes to expected outcomes.

2. What is a test harness?

A program, application, or test tool used to execute tests. Test harnesses are used to facilitate test automation.

3. What is white-box testing?

Testing based on an analysis of internal workings and structure of a piece of software. It’s also known as Structural Testing, Glass Box Testing, Clear Box Testing. White box testing is the opposite of black box testing

4. What is a memory leak?

A memory leak is the loss of system memory to an application that is continuously allocating memory and not releasing it when it’s done with it.

5. What is a smoke test?

It is the test pass that is run just after the application is built, but prior to releasing the application to the test team for further testing. Its purpose is to find any glaring issues with the build before being distributed to a wider audience.

6. What is ‘Reflection’?

Reflection is the ability of a program to examine and possibly modify its high level structure at runtime.

7. What is polymorphism?

The ability at runtime to determine the correct function to call based on the type of the instance, not the type of the base class pointer that is pointing to that instance.


Test

1. What is ad hoc testing?

Ad hoc testing normally refers to the process of improvised, impromptu bug searching.

2. What goes into the body of a good bug report?

A good bug report contains a descriptive summary of the bug, the steps to reproduce the bug, the expected behavior of the bug, and the actual behavior of the bug.

3. What is the difference between priority and severity?

Priority refers to how important a bug is to be fixed, and severity refers to how detrimental or damaging the bug is to the system or user experience.

4. What is regression testing?

Verifying that bugs that have been previously fixed have not regressed, i.e. that the bugs have not reappeared due to a change in the code since the bug was originally fixed.

5. What are the different test categories that test cases are commonly grouped by?

Functionality, Usability, Accessibility, Performance, Stress, Load, Scalability, Security, Compatibility, Localization, Globalization, UI, Documentation,

6. How would you test a light bulb?

[An average candidate should be able to enumerate test cases for at least 2 to 3 minutes without interruption. A strong candidate will be able to go on forever generating test cases. Every test case should be in the form of a question of “If I do this, does it do that?”, not statements asserting “it should do this, and it should do that…”. A strong test candidate will be curious, have a break-it attitude, will be passionate about quality, will be methodical, and have an attention to detail.] [there is no right answer for this question, just a candidates ability to demonstrate the points above]

7. When is a product ready to ship?

When test is confident that all issues have been identified, documented, and resolved. [A poor answer would be “when all bugs have been fixed”. Upper management is responsible for deciding when a product is ready to ship. It’s tests responsibility to make sure upper management has all the information they need to make a calculated decision.]


COM

1. What is an interface?

An interface is an agreement between a client and an object about how they will communicate with each other. It defines the methods and functions that the developer must implement.

2. What is a GUID?

A GUID is a 128bit globally unique identifier used to uniquely identify a COM interface or component.

3. How do you register and un-register a COM object?

To register, you call regsrv32 and pass the COM DLL as a parameter. To un-register, you call regsrv32 and pass the COM DLL as a parameter as well as –U as a parameter.

4. What are the three methods that the IUnknown interface defines?

QueryInterface(), AddRef(), and Release().

5. What is the purpose of reference counting?

To keep track of how many references to the COM object an application has so that when the application no longer needs those references, the COM subsystem knows it can de-allocate and release the resources associated with that COM object.
Computer Science

1. What is the difference between a stack and a queue?

A stack is “last in first out” (LIFO), and a queue is “first in first out” (FIFO)

2. What is the difference between an array and a linked list?

An array is static in size, where as a linked list is dynamic in size. Items in the array can be accessed in constant time, O(1) or “’O’ of one” using array indexing where as items in a linked list are accessed in linear time; O(n) or “‘O’ of N” by starting from the head of the list and iterating through it till you find the item you need.

3. How do you know when you’ve arrived at the end of a singly linked list?

Your cursor or iterator will be NULL.

4. What is the structure of a node in a singly linked list?

There are two components you need:

1) The data component.

2) A pointer to the next node in the singly linked list.

5. What is the time complexity of a binary search?

‘O’ of log n. “O(log n)”

6. Which primitive data structure is better for use in a hashtable; an array or a linked list? Why?

An array because you need to be able to index into the collection in ‘O’ of one, “O(1)”, constant time. Using a linked list, you’ll only ever be able to achieve ‘O’ of ‘n’, “O(n)”, linear time.


7. What advanced data structure guarantees ‘O’ of log ‘n’, “O(log n)”, performance for searching, insertion, and deletion?

A Red-Black tree.


JavaScript

1. Do variables need to be declared before being used?

No

2. What does NaN stand for, and when do you see it?

NaN stands for “Not a Number”. You see it for number variables that have not been initialized.

3. What is the purpose of the instanceof() method?

The instanceof() method tests if an object is of a particular type.

4. Does JavaScript support function overloading?

No

5. If you accidentally give a form element name the same name as a function name, which takes precedence if accessed or called?

The element name is the only one accessible; you will not be able to call the function if it’s name is the same as a form element.

6. What is the keyword used to break into your code at the line the keyword is on?

The ‘debugger’ keyword.

7. Write a regular expression that matches the format “1-800-888-8134”?

\d-\d\d\d-\d\d\d-\d\d\d\d


TCP/IP

1. What does TCP/IP stand for?

Transmission Control Protocol/Internet Protocol

2. What does UDP stand for?

User Datagram Protocol.

3. What is the console utility to determine your IP addresses?

ipconfig

4. What is the difference between TCP and UDP?

TCP is a connected protocol and UDP is a connectionless protocol. TCP is guaranteed delivery and UDP is not. UDP is used primarily for broadcasting messages over a network. UDP is lightweight compared to TCP. TCP is reliable where UDP is not.

5. How do you flush your DNS cache from the console?

Call the ipconfig utility and pass the parameter as follows “ipconfig –flushdns”

6. What is a NAT?

NAT stands for “network address translation”. It is a technique in which the source and/or destination addresses of IP packets are rewritten as they pass through a router or firewall. It is most commonly used to enable multiple hosts on a private network to access the Internet using a single public IP address.


IIS

1. What is a virtual directory?

A virtual directory is essentially an alias that can be referenced from the internet to access a physical directory on a web server.

2. What is SSL?

Secure Sockets Layer.

3. What port does SSL run on by default?

Port 443

4. Describe the different isolation levels supported by IIS?

Low, Medium, and High. Low is “In-process” and is not protected from other applications that crash that are running in-process too. Medium is “pooled out-of-process” and is protected from the effects of applications that run in High isolation; however, the applications are not protected from each other. High is “out-of-process”, is protected from the effects of other applications that run in Medium or High isolation, and it cannot affect other applications running on the same computer.

5. What are the different authentication schemes supported by IIS?

Anonymous, Basic, Digest, Integrated Windows Authentication, and Client Certificate Mapping

6. What are the default security accounts used by each isolation level, and what processes do they run under?

Low uses the LocalSystem account and runs under the inetinfo.exe process. Both Medium and high use the IWAM_ComputerName account and run under the DllHost.exe process.