ALL Interview Questions

Document Sample
ALL Interview Questions Powered By Docstoc
					C Interview Questions



1. What will a read() function do?
A.A method in Input Stream. It reads a single byte or an array of
bytes. Returns no of bytes read or -1 if EOF(End of file)is reached

2. Static binding occurs at Compile Time, Runtime?
A. Both at compile and runtime.

3: How do you link a C++ program to C functions?
A. By using the extern "C" linkage specification around the C function
declarations. Programmers should know about mangled function names and
type-safe linkages. Then they should explain how the extern "C" linkage
specification statement turns that feature off during compilation so
that the linker properly links function calls to C functions. Another
acceptable answer is "I don't know. We never had to do that." Merely
describing what a linker does indicates that the programmer does not
understand the issue that underlies the question.

4.What sorting algos have their best and worst case times equal ?
A.O(nlogn) for mergesort and heap sort

5.What is a default constructor?
A constructor that has no arguments.
If you don't code one, the compiler provides one if there are no other
constructors. If you are going to instantiate an array of objects of
the class, the class must have a default constructor.

Object Oriented Analysis Design Questions



1.Differentiate persistent & non-persistent objects?
Persistent refers to an object's ability to transcend time or space. A
persistent object stores/saves its state in a permanent storage system
with out losing the information represented by the object. A
non-persistent object is said to be transient or ephemeral. By default objects
are considered as non-persistent.

2. Differentiate the class representation of Booch, Rumbaugh and UML?
If you look at the class representation of Rumbaugh and UML, It is some
what similar and both are very easy to draw.

3.What are models and meta models?
Model: It is a complete description of something (i.e. system).
Meta model: It describes the model elements, syntax and semantics of
the notation that allows their manipulation.

4.What do you meant by static and dynamic modeling?
Static modeling is used to specify structure of the objects that exist
in the problem domain. These are expressed using class, object and
USECASE diagrams. But Dynamic modeling refers representing the object
interactions during runtime. It is represented by sequence, activity,
collaboration and state chart diagrams

5.Why generalization is very strong?
Even though Generalization satisfies Structural, Interface, Behaviour
properties. It is mathematically very strong, as it is Ant symmetric and
Transitive.Antisymmetric: employee is a person, but not all persons are
employees. Mathematically all As' are B, but all Bs' not A.

Operating System Interview Questions

1Explain Belady's Anomaly.
Also called FIFO anomaly. Usually, on increasing the number of frames
allocated to a process' virtual memory, the process execution is faster,
because fewer page faults occur. Sometimes, the reverse happens, i.e.,
the execution time increases even when more frames are allocated to the
process. This is Belady's Anomaly. This is true for certain page
reference patterns.

3.What is a binary semaphore? What is its use?
A binary semaphore is one, which takes only 0 and 1 as values. They are
used to implement mutual exclusion and synchronize concurrent
processes.
4. What is thrashing?
It is a phenomenon in virtual memory schemes when the processor spends
most of its time swapping pages, rather than executing instructions.
This is due to an inordinate number of page faults.

DBMS Interview Questions



1. Which data type is used for storing graphics and images ?
LONG RAW data type is used for storing BLOB's (binary large objects).

2. When you use WHERE clause and when you use HAVING clause ?
HAVING clause is used when you want to specify a condition for a group
function and it is written after GROUP BY clause
The WHERE clause is used when you want to specify a condition for
columns, single row functions except group functions and it is written
before GROUP BY clause if it is used.

3. Which is more faster - IN or EXISTS?
EXISTS is more faster than IN because EXISTS returns a Boolean value
whereas IN returns a value.

4. What is a OUTER JOIN?
Outer Join--Its a join condition used where you can query all the rows
of one of the tables in the join condition even though they don't
satisfy the join condition.

Network Interview Questions



1.What is frame relay, in which layer it comes?
Frame relay is a packet switching technology. It will operate in the
data link layer.

2.What is terminal emulation, in which layer it comes?
Telnet is also called as terminal emulation. It belongs to application
layer.

Object Oriented Analysis & Design INTERVIEW QUESTIONS



1.Differentiate persistent & non-persistent objects?
Persistent refers to an object's ability to transcend time or space. A
persistent object stores/saves its state in a permanent storage system
with out losing the information represented by the object.
A non-persistent object is said to be transient or ephemeral. By
default objects are considered as non-persistent.




2.What do you meant by active and passive objects?
Active objects are one which instigate an interaction which owns a
thread and they are responsible for handling control to other objects. In
simple words it can be referred as client.
Passive objects are one, which passively waits for the message to be
processed. It waits for another object that requires its services. In
simple words it can be referred as server.
3.What is meant by software development method?
Software development method describes how to model and build software
systems in a reliable and reproducible way. To put it simple, methods
that are used to represent ones' thinking using graphical notations.




4.What are models and meta models?
Model:It is a complete description of something (i.e. system).
Meta model:It describes the model elements, syntax and semantics of the
notation that allows their manipulation.




5.What do you meant by static and dynamic modeling?
Static modeling is used to specify structure of the objects that exist
in the problem domain. These are expressed using class, object and
USECASE diagrams.But Dynamic modeling refers representing the object
interactions during runtime. It is represented by sequence, activity,
collaboration and statechart diagrams




6.Why generalization is very strong?
Even though Generalization satisfies Structural, Interface, Behaviour
properties. It is mathematically very strong, as it is Antisymmetric and
Transitive.Antisymmetric: employee is a person, but not all persons are
employees. Mathematically all As’ are B, but all Bs’ not A.




7.Differentiate Aggregation and containment?
Aggregation is the relationship between the whole and a part. We can
add/subtract some properties in the part (slave) side.It won't affect
the whole part.Best example is Car, which contains the wheels and some
extra parts. Even though the parts are not there we can call it as
car.But, in the case of containment the whole part is affected when the part
within that got affected. The human body is an apt example for this
relationship. When the whole body dies the parts (heart etc) are died.
8.Can link and Association applied interchangeably?
No, You cannot apply the link and Association interchangeably. Since
link is used represent the relationship between the two objects.




9.What is meant by "method-wars"?
Before 1994 there were different methodologies like Rumbaugh, Booch,
Jacobson, Meyer etc who followed their own notations to model the
systems. The developers were in a dilemma to choose the method which best
accomplishes their needs. This particular span was called as
"method-wars"




10.Whether unified method and unified modeling language are same or
different?
Unified method is convergence of the Rumbaugh and Booch.Unified
modeling lang. is the fusion of Rumbaugh, Booch and Jacobson as well as
Betrand Meyer (whose contribution is "sequence diagram"). Its' the superset
of all the methodologies.

ADO.NET & ASP.NET QUESTIONS & ANSWERS
======================================



ASP.NET Interview Questions




Describe the role of inetinfo.exe, aspnet_isapi.dll and aspnet_wp.exe
in the page loading process ?

inetinfo.exe is the Microsoft IIS server running, handling ASP.NET
requests among other things. When an ASP.NET request is received (usually a
file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes
care of it by passing the request to the actual worker process
aspnet_wp.exe.




What’s the difference between Response.Write() and
Response.Output.Write()?
Response.Output.Write() allows you to write formatted output.

What methods are fired during the page load?
Init() - when the page is instantiated
Load() - when the page is loaded into server memory
PreRender() - the brief moment before the page is displayed to the user
as HTML
Unload() - when page finishes loading.

When during the page processing cycle is ViewState available?
After the Init() and before the Page_Load(), or OnLoad() for a control.

What namespace does the Web page belong in the .NET Framework class
hierarchy?
System.Web.UI.Page

Where do you store the information about the user’s locale?
System.Web.UI.Page.Culture

What’s the difference between Codebehind="MyCode.aspx.cs" and
Src="MyCode.aspx.cs"?
CodeBehind is relevant to Visual Studio.NET only.




What’s a bubbled event?
When you have a complex control, like DataGrid, writing an event
processing routine for each object (cell, button, row, etc.) is quite
tedious. The controls can bubble up their event handlers, allowing the main
DataGrid event handler to take care of its constituents.
Suppose you want a certain ASP.NET function executed on MouseOver for a
certain button. Where do you add an event handler? Add an OnMouseOver
attribute to the button. Example:
btnSubmit.Attributes.Add("onmouseover","someClientCodeHere();");




What data types do the RangeValidator control support?
Integer, String, and Date.
Explain the differences between Server-side and Client-side code?
Server-side code executes on the server. Client-side code executes in
the client's browser.
What type of code (server or client) is found in a Code-Behind class?
The answer is server-side code since code-behind is executed on the
server. However, during the code-behind's execution on the server, it can
render client-side code such as JavaScript to be processed in the
clients browser. But just to be clear, code-behind executes on the server,
thus making it server-side code.




Should user input data validation occur server-side or client-side?
Why?
Ans : All user input data validation should occur on the server at a
minimum. Additionally, client-side validation can be performed where
deemed appropriate and feasable to provide a richer, more responsive
experience for the user.




What is the difference between Server.Transfer and Response.Redirect?
Why would I choose one over the other?
Server.Transfer transfers page processing from one page directly to the
next page without making a round-trip back to the client's browser.
This provides a faster response with a little less overhead on the
server. Server.Transfer does not update the clients url history list or
current url. Response.Redirect is used to redirect the user's browser to
another page or site. This perform as a trip back to the client where
the client's browser is redirected to the new page. The user's browser
history list is updated to reflect the new address.




ADO.NET and Database Questions:

What is the role of the DataReader class in ADO.NET connections?
Ans : It returns a read-only, forward-only rowset from the data source.
A DataReader provides fast access when a forward-only sequential read
is needed.
What are advantages and disadvantages of Microsoft-provided data
provider classes in ADO.NET?
Ans : SQLServer.NET data provider is high-speed and robust, but
requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal
for accessing other sources, like Oracle, DB2, Microsoft Access and
Informix. OLE-DB.NET is a .NET layer on top of the OLE layer, so it’s not
as fastest and efficient as SqlServer.NET.




What is the wildcard character in SQL?
Ans : Let’s say you want to query database with LIKE for all employees
whose name starts with La. The wildcard character is %, the proper
query with LIKE would involve ‘La%’.




Explain ACID rule of thumb for transactions.
Ans : A transaction must be:
1.Atomic - it is one unit of work and does not dependent on previous
and following transactions.
2.Consistent - data is either committed or roll back, no “in-between”
case where something has been updated and something hasn’t.
3.Isolated - no transaction sees the intermediate results of the
current transaction).
4.Durable - the values persist if the data had been committed even if
the system crashes right after.




What connections does Microsoft SQL Server support?
Ans : Windows Authentication (via Active Directory) and SQL Server
authentication (via Microsoft SQL Server username and password).
Between Windows Authentication and SQL Server Authentication, which one
is trusted and which one is untrusted?
Ans : Windows Authentication is trusted because the username and
password are checked with the Active Directory, the SQL Server authentication
is untrusted, since SQL Server is the only verifier participating in
the transaction.




What does the Initial Catalog parameter define in the connection
string?
Ans : The database name to connect to.




What does the Dispose method do with the connection object?
Ans : Deletes it from the memory.




What is a pre-requisite for connection pooling?
Ans : Multiple processes must agree that they will share the same
connection, where every parameter is the same, including the security
settings. The connection string must be identical.

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:149
posted:2/27/2010
language:English
pages:9
About