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.

No comments: