Friday, August 22, 2008

Infosys InterView Question

Infosys
can we have multiple datatables in a datareader ?
Yes, we can have multiple result set means multiple datatable data in one datareader..., code as below
SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["con"]);
SqlCommand cmd = new SqlCommand("SELECT SiteName FROM
Sites;SELECT SiteCode FROM Sites", con);
cmd.Connection.Open();
SqlDataReader r = cmd.ExecuteReader();
do {
while(r.Read()) {
Response.Write(r.GetString(0) + "
");
}
} while (r.NextResult());
r.Close();
con.Close();
cmd = null;
r = null;
con = null;
How do you ensure quality of code ?
We ensure quality of code by doing
1)Self code review
2)Peer to peer code review.
3)Adher to different coding standards
4)Follow best coding practices.
5)Ensure right code version by making CM audit check list.
What are sequence diagrams, collaboration diagrams and difference between them ?
Sequence diagram is basically a flow chart w.r.t time.
However, a collabration diagram is very much the sequence diagram without any time.
Collaboration diagrams basically shows the interaction of the various objects.
what are all the test scenarios for login passwords?(user authentication)
* Ensure that total number of chrecters are with in the range.
* The copy option should not be provided.
* ensure that not to accept white spaces.
* spelcial cheractor are alowed.
what is SDLC? what are the different stages in SDLC?
Acronym for system development life cycle. SDLC is the process of
developing information systems through investigation, analysis,
design, implementation and maintenance.
SDLC is also known as information systems development or application
development.
SDLC is a systems approach to problem solving and is made up of
several
phases, each comprised of multiple steps:
The software concept - identifies and defines a need for the new
system
A requirements analysis - analyzes the information needs of the end
users
The architectural design - creates a blueprint for the design with the
necessary specifications for the hardware, software, people and data
resources
Coding and debugging - creates and programs the final system
System testing - evaluates the system's actual functionality in
relation to expected or intended functionality.
What is a formatter?
A formatter is an object that is responsible for encoding and serializing data into messages on one end, and deserializing and decoding messages into data on the other end.
What does VS.NET contains ?
VS.NET contains .NET FRAMEWORK includes Window form, Web Form, Base Class Libraries and CLR.
Is VB.NET object oriented? What are the inheritances does VB.NET support ?
vb.net is object oriented concept.it is supports to inheritence but it donot support to multiple inheritance.
what are the advantage in vb.net and different between vb and vb.net ?
Adv of VB.NET:
vb is object based. vb.net is object oriented.
vb use record set for database connection
vb.net use dataset for database connection
Write a query to delete duplicate records in SQL SERVER
DELETE FROM A WHERE(id NOT IN
(SELECT MAX(ID) FROM A GROUP BY name))
suppose i have table called A. A has two coloumn id
(identity) as int and Name as nvarchar. I have data like
this.
id Name
1 C
2 D
3 C
4 E
5 D
6 D
In performance wise distinct is good or group by is good? eg:select name from emp group by name; select distinct name from emp;
This question is asked many times to me. What is difference between DISTINCT and GROUP BY?
A DISTINCT and GROUP BY usually generate the same query plan, so performance should be the same across both query constructs.
GROUP BY should be used to apply aggregate operators to each group. If all you need is to remove duplicates then use DISTINCT. If you are using sub-queries execution plan for that query varies so in that case you need to check the execution plan before making decision of which is faster.
Example of DISTINCT:
SELECT DISTINCT Employee, Rank FROM Employees
Example of GROUP BY:
SELECT Employee, Rank FROM Employees GROUP BY Employee, Rank
Can you create UNIQUE and PRIMARY KEY constraints on computed columns in SQL Server 2000?
Because SQL Server 2000 supports indexes on computed columns, you can create UNIQUE and PRIMARY KEY constraints on computed columns.
What is JIT, what are types of JITS and their purpose ?
JIT is Just in Time compiler which compiles the MSIL into NAtive code.
There are three types of JIT copilers.
Pre-JIT. Pre-JIT compiles complete source code into native code in a
single compilation cycle. This is done at the time of deployment of
the application.
Econo-JIT. Econo-JIT compiles only those methods that are called at
runtime.However, these compiled methods are removed when they are not
required.
Normal-JIT. Normal-JIT compiles only those methods that are called at
runtime.These methods are compiled the first time they are called,
and then they are stored in cache. When the same methods are called
again, the compiledcode from cache is used for execution.
What is SOAP, UDDI and WSDL ?
SOAP (Simple Object Access Protocol): is a simple protocol for exchange of information. It is based on XML and consists of three parts: a SOAP envelope (describing what's in the message and how to process it); a set of encoding rules, and a convention for representing RPCs (Remote Procedure Calls) and responses.
UDDI (Universal Description, Discovery, and Integration): is a specification designed to allow businesses of all sizes to benefit in the new digital economy. There is a UDDI registry, which is open to everybody. Membership is free and members can enter details about themselves and the services they provide. Searches can be performed by company name, specific service, or types of service. This allows companies providing or needing web services to discover each other, define how they interact over the Internet and share such information in a truly global and standardized fashion.
WSDL (Web Services Description Language) defines the XML grammar for describing services as collections of communication endpoints capable of exchanging messages. Companies can publish WSDLs for services they provide and others can access those services using the information in the WSDL. Links to WSDLs are usually offered in a company?s profile in the UDDI registry.
What is caching and types of caching ?
To Imporve the performance of Web Pages, we use Caching.
Caching is a used for persisting data in memory for immediate acces to the program calls. It has three types :
1. Output Caching - to fetch page level information and data
2. Fragment Caching - to cache the information of a structure level.
3. Application Caching - to fetch the information of an application.
what is virtual function?
virtual function can be used to override the propertis of a function.
it is normaly used in inheritance. it is part of polymorphism.
HOW TO FIND THE EMPLOYEE DETAILS WHO ARE GETTING SAME SALARY IN EMP TABLE?
SELECT * FROM EMP WHERE (SAL = (SELECT sal FROM emp GROUP BY sal HAVING COUNT(sal) > 1))
IBM
exe abrevation

Executable (File Name Extension)
(or)
Execute.
what is .net?
What is the difference between managed and unmanaged code?
What are the types of assemblies and where can u store them and how ?
what is data Adapter?
what is the syntax code for oldb to connect oracle?
using System.Data.Oledb;
Oledbconnection cn=new OleDbConnection("Provider=Msdaora.1;uid=;pwd=;server=
");
cn.open();
How do you merge two datasets into the third dataset in a simple manner?
ds1.Merge(ds2,true)
How many sub-reports can report can have?
maximum 256
What is the difference between User Controls and Master Pages
Ans : Q.No: 63
What is boxing?
converting value type to reference type is called boxing.
where we use javascript and for which purpose we use javascript how?
Ans: Q.No: 64
GE
How do you turn off cookies for one page in your site?
Use the Cookie.Discard Property which Gets or sets the discard flag set by the server. When true, this property instructs the client application not to save the Cookie on the user’s hard disk when a session ends.
I have to send data throug querystring from one page to another. But it should not be displayed in URL. How it is possible?
using hidden feilds
By URL rewriting
How many .rpt files are be there in a main report having 2 sub reports?
there are 3 .rpt files including the main and 2 sub report.but when the subreports are inserted into main it will behave like one only.
Does Crystal Report support all the functions that we have in Oracle?
No, Crystal report does not support all the functions. Like Decode function is there in SQL but not there is crystal report. You need to convert that in crystal report format (in if and else etc.).
What is command routing in MFC
Check the Command pattern in Gof books, MFC almost use it in the same way:SubWidget in the dialog will catch it firstly, it will forward it to Parent window(the dialog) if *request is not for it or no handler defined.
This procedure runs recursively, until one handle it or pass it to application object. Application will omit unknown command by default

No comments:

.

.