Showing posts with label Technical Interview. Show all posts
Showing posts with label Technical Interview. Show all posts

Sunday, January 11, 2015

couch mode print story

Interview Tips

Preparation is an important part of the interview process. The time you spend preparing prior to the interview will be time well spent in your job search process. The following are some tips on what you can do to prepare yourself before, during, and after a job interview.


Before the Interview ::

Review the Job Specification and Position Description. Job Specifications can be found at www.michigan.gov/mdcs under Job Specifications/Pay and Position Descriptions are attached to the job posting. Learn more about the department by visiting their web page. Review your résumé and be prepared to discuss your relevant skills. Decide who your references are. They should be a current or past supervisor, coworker, teacher/professor or associate who has knowledge of your work history, skills, abilities, accomplishments, initiative, education and integrity. Get permission to use their name in advance and collect their current contact information (including e-mail address). Bring extra copies of your résumé and a notebook. Dress for Success -Appearance should reflect maturity and self-confidence. Be neat, clean, and dress in good taste. Find out where the interview will be, obtain clear directions, and confirm the time. Plan to arrive 10- 15 minutes early. 



During the Interview ::

Relax! Think of the interview as a conversation, not an interrogation. Be enthusiastic, confident, courteous, and honest. Listen to the questions carefully and give clear, concise, and thoughtful answers. Convey interest in the organization and knowledge of the position. Ask relevant questions about the job or department. Present a list of your references and any letters of recommendation or reference that you may have to offer. End the interview with a firm handshake and thank the interview panel for their time and consideration.



After the Interview ::

Send a concise 1 – 3 paragraph thank-you letter within 24 to 48 hours of the interview. Reiterate your interest in the position, mention anything you know reinforces you as a good fit for the job, and your contact information. If you are not selected for the job, it is OK to politely ask an interviewer which area(s) you could improve on in the future!

All The Very BEST.

Friday, April 4, 2014

couch mode print story

.NET Interview Questions and Answers

.NET Interview Questions and Answers

1. What is .NET?

.NET is essentially a framework for software development. It is similar in nature to any other software
development framework (J2EE etc) in that it provides a set of runtime containers/capabilities, and a rich set of pre-built functionality in the form of class libraries and APIs The .NET Framework is an environment for building, deploying, and running Web Services and other applications. It consists of three main parts: the Common Language Runtime, the Framework classes, and ASP.NET.


2. How many languages .NET is supporting now?

When .NET was introduced it came with several languages. VB.NET, C#, COBOL and Perl, etc. The site DotNetLanguages.Net says 44 languages are supported.


3. How is .NET able to support multiple languages?

A language should comply with the Common Language Runtime standard to become a .NET language. In
.NET, code is compiled to Microsoft Intermediate Language (MSIL for short). This is called as Managed Code. This Managed code is run in .NET environment. So after compilation to this IL the language is not a barrier. A code can call or use a function written in another language.


4. What is ASP.NET?

ASP.NET is a server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server. ASP.NET provides increased performance by running compiled code.


5. What is the difference between Classic ASP and ASP.Net?

ASP is Interpreted language based on scripting languages like Jscript or VBScript.
 ASP has Mixed HTML and coding logic.
 Limited development and debugging tools available.
 Limited OOPS support.
 Limited session and application state management. ASP.Net is supported by compiler and has compiled language support.
 Separate code and design logic possible.
 Variety of compilers and tools available including the Visual studio.Net.
 Completely Object Oriented.
 Complete session and application state management.
 Full XML Support for easy data exchange.


6. How can we identify that the Page is Post Back?

Page object has an "IsPostBack" property, which can be checked to know that is the page posted back.


7. What is smart navigation?

The cursor position is maintained when the page gets refreshed due to the server side validation and the page
gets refreshed.


8. What is view state?

The web is stateless. But in ASP.NET, the state of a page is maintained in the in the page itself automatically.
How? The values are encrypted and saved in hidden controls. this is done automatically by the ASP.NET. This can be switched off / on for a single control.


9. What is Difference between Namespace and Assembly?

Namespace is a logical design-time naming convenience, whereas an assembly establishes the name scope for types at run time.


10. How do you validate the controls in an ASP .NET page?

Using special validation controls that are meant for this. We have Range Validator, Email Validator.


11. What is the difference between SQL notification and SQL invalidation?

The SQL cache notification generates notifications when the data of a database changes, on which your cache item depends. The SQL cache invalidation makes a cached item invalid when the data stored in a SQL server database changes.


12. What are the advantages of the code-behind feature?

The code-behind feature of ASP.NET offers a number of advantages:
 Makes code easy to understand and debug by separating application logic from HTML tags
 Provides the isolation of effort between graphic designers and software engineers
 Removes the problems of browser incompatibility by providing code files to exist on the Web server and supporting Web pages to be compiled on demand.


13. What is ADO .NET and what is difference between ADO and ADO.NET?

ADO.NET is stateless mechanism. I can treat the ADO.Net as a separate in-memory database where in I can use relationships between the tables and select insert and updates to the database. I can update the actual database as a batch.


14. What is a PostBack?

The process in which a Web page sends data back to the same page on the server.


15. What is AutoPostBack?

If you want a control to postback automatically when an event is raised, you need to set theAutoPostBack property of the control to True.


16. What is the difference between static or dynamic assemblies?

Assemblies can be static or dynamic.
Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the
assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in portable
executable (PE) files.
Dynamic assemblies, which are run directly from memory and are not saved to disk before execution. You
can save dynamic assemblies to disk after they have executed.


17. What is the function of the ViewState property?

The ASP.NET 4.0 introduced a new property called ViewStateMode for the Control class. Now you can enable the view state to an individual control even if the view state for an ASP.NET page is disabled.


18. What are the difference between Structure and Class?

 Structures are value type and Classes are reference type
 Structures can not have constructor or destructors.
 Classes can have both constructor and destructors.
 Structures do not support Inheritance, while Classes support Inheritance.


19. Why do you use the App_Code folder in ASP.NET?

The App_Code folder is automatically present in the project. It stores the files, such as classes, typed data set, text files, and reports. If this folder is not available in the application, you can add this folder. One of the
important features of the App_Code folder is that only one dll is created for the complete folder, irrespective of how many files it contains.


20. What is the difference between Custom Control and User Control?

Custom Controls are compiled code (Dlls), easier to use, difficult to create, and can be placed in toolbox.
Drag and Drop controls. Attributes can be set visually at design time. Can be used by Multiple Applications (If Shared Dlls), Even if Private can copy to bin directory of web application add reference and use. Normally designed to provide common functionality independent of consuming Application.
User Controls are similar to those of ASP include files, easy to create, can not be placed in the toolbox and
dragged - dropped from it. A User Control is shared among the single application files.


21. What is an ASP.NET Web Form?

ASP.NET Web forms are designed to use controls and features that are almost as powerful as the ones used
with Windows forms, and so they are called as Web forms. The Web form uses a server-side object model that allows you to create functional controls, which are executed on the server and are rendered as HTML on the client. The attribute, runat="server", associated with a server control indicates that the Web form must be processed on the server.


22. What is IIS? Why is it used?

Internet Information Services (IIS) is created by Microsoft to provide Internet-based services to ASP.NET Web applications. It makes your computer to work as a Web server and provides the functionality to develop and deploy Web applications on the server. IIS handles the request and response cycle on the Web server. It also offers the services of SMTP and FrontPage server extensions. The SMTP is used to send emails and use FrontPage server extensions to get the dynamic features of IIS, such as form handler.


23. What are the types of Authentication?

There are 3 types of Authentication. Windows, Forms and Passport Authentication.
 Windows authentication uses the security features integrated into the Windows NT and Windows XP
operating systems to authenticate and authorize Web application users.
 Forms authentication allows you to create your own list/database of users and validate the identity of those
users when they visit your Web site.
 Passport authentication uses the Microsoft centralized authentication provider to identify users. Passport
provides a way to for users to use a single identity across multiple Web applications. To use Passport
authentication in your Web application, you must install the Passport SDK.


24. What is datagrid?

The DataGrid Web server control is a powerful tool for displaying information from a data source. It is easy to use; you can display editable data in a professional-looking grid by setting only a few properties. At the same time, the grid has a sophisticated object model that provides you with great flexibility in how you display the data.


25. Differentiate globalization and localization.

The globalization is a technique to identify the specific part of a Web application that is different for different
languages and make separate that portion from the core of the Web application. The localization is a procedure of configuring a Web application to be supported for a specific language or locale.

couch mode print story

C++ Interview Questions and Answers

C++ Interview Questions and Answers

1. What is C++ ?

C++ is created by Bjarne Stroustrup of AT&T Bell Labs as an extension of C, C++ is an objectoriented
computer language used in the development of enterprise and commercial applications.
Microsoft’s Visual C++ became the premier language of choice among developers and programmers.

2. What are the basic concepts of object oriented programming?

It is necessary to understand some of the concepts used extensively in object oriented programming.These include
1. Objects
2. Classes
3. Data abstraction and encapsulation
4. Inheritance
5. Polymorphism
6. Dynamic Binding
7. Message passing


3. Define polymorphism?

Polymorphism means one name, multiple forms. It allows us to have more than one function with the same
name in a program. It allows us to have overloading of operators so that an operation can exhibit different
behaviors in different instances.


4. Define inheritance?

The mechanism of deriving a new class (derived) from an old class (base class) is called inheritance. It allows
the extension and reuse of existing code without having to rewrite the code from scratch. Inheritance is the
process by which objects of one class acquire properties of objects of another class.


5. What is encapsulation?

The wrapping up of data and functions into a single unit (called class) is known as encapsulation. Encapsulation containing and hiding information about an object, such as internal data structures and code.


6. Define Constructors?

A constructor is a member function with the same name as its class. The constructor is invoked whenever an
object of its associated class is created.It is called constructor because it constructs the values of data
members of the class.


7. What is copy constructor ?

Constructor which initializes it's object member variables with another object of the same class. If you don't
implement one in your class then compiler implements one automatically.


8. What is the use of default constructor?

A constructors that accepts no parameters is called the default constructor.If no user-defined constructor
exists for a class A and one is needed, the compiler implicitly declares a default parameterless constructor
A::A(). This constructor is an inline public member of its class. The compiler will implicitly define A::A() when
the compiler uses this constructor to create an object of type A. The constructor will have no constructor
initializer and a null body.


9. What is destructor ?

A destructor is called for a class object when that object passes out of scope or is explicitly deleted.A
destructors as the name implies is used to destroy the objects that have been created by a constructors. Like a constructor , the destructor is a member function whose name is the same as the class name but is preceded by a tilde.


10. What is virtual destructor ?

A destructor can be virtual as it is possible as at runtime depending on the type of object caller is calling to,
proper destructor will be called.


11. What are tokens in C++?

The smallest individual units of a program is known as tokens. c++ has the following tokens :
 Keywords
 Identifiers
 Constants
 Strings
 Operators


12. What is the use of enumerated data type ?

An enumerated data type is another user defined type which provides a way for attaching names to numbers
thereby increasing comprehensibility of the code. The enum keyword automatically enumerates a list of words by assigning them values 0,1,2, and so on.


13. How variable declaration in c++ differs that in c?

C requires all the variables to be declared at the beginning of a scope but in c++ we can declare variables
anywhere in the scope. This makes the programmer easier to understand because the variables are declared
in the context of their use.


14. How can we handle a constructor that fails?

Throw an exception. Constructors don't have a return type, so it's not possible to use return codes. The best
way to signal constructor failure is therefore to throw an exception.


15. What is the difference between Object and Instance?

An instance of a user-defined type is called an object. We can instantiate many objects from one class.
An object is an instance of a class.


16. What is multiple inheritance?

A class can inherit properties from more than one class which is known as multiple inheritance.


17. What is the difference between class and structure?

 By default, the members ot structures are public while that tor class is private.
 structures doesn’t provide something like data hiding which is provided by the classes.
 structures contains only data while class bind both data and member functions.


18. What is dynamic binding?

Dynamic binding (also known as late binding) means that the code associated with a given procedure call is not known until the time of the call at run time.It is associated with polymorphism and inheritance


19. what is difference between function overloading and operator overloading?

A function is overloaded when same name is given to different function. While overloading a function, the return type of the functions need to be the same.


20. What is the difference between a template class and class template?

Template classA generic definition or a parameterized class not instantiated until the client provides the needed information. It’s jargon for plain templates.
Class templateA class template specifies how individual classes can be constructed much like the way a class specifies how individual objects can be constructed. It’s jargon for plain classes.

couch mode print story

Data Structure Interview Questions and Answers

Data Structure Interview Questions and Answers

1. What is data structure?

A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship between data items allows designing of efficient algorithms for the manipulation of data.


2. List out the areas in which data structures are applied extensively?

1. Compiler Design,
2. Operating System,
3. Database Management System,
4. Statistical analysis package,
5. Numerical Analysis,
6. Graphics,
7. Artificial Intelligence,
8. Simulation


3. If you are using C language to implement the heterogeneous linked list, what pointer type will you use?

The heterogeneous linked list contains different data types in its nodes and we need a link, pointer to connect
them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of
storing pointer to any type as it is a generic pointer type.


4. What is the data structures used to perform recursion?

Stack. Because of its LIFO (Last In First Out) property it remembers its caller, so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the
function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such
equivalent iterative procedures are written, explicit stack is to be used.


5. Minimum number of queues needed to implement the priority queue?

Two. One queue is used for actual storing of data and another for storing priorities.


6. What is a linked list?

A linked list is a linear collection of data elements, called nodes, where the linear order is given by pointers.
Each node has two parts first part contain the information of the element second part contains the address of
the next node in the list.


7. What is a queue?

A queue is an ordered collection of items from which items may be deleted at one end (front end) and items
inserted at the other end (rear end). It obeys FIFO rule there is no limit to the number of elements a queue
contains.


8. What is a spanning Tree?

A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree once. A
minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is
minimized.


9. What is precision?

Precision refers the accuracy of the decimal portion of a value. Precision is the number of digits allowed after
the decimal point.


10. What are the methods available in storing sequential files ?

1. Straight merging,
2. Natural merging,
3. Polyphase sort,
4. Distribution of Initial runs.


11. List out few of the Application of tree data-structure?

1. The manipulation of Arithmetic expression,
2. Symbol Table construction,
3. Syntax analysis.


12. What is the difference between a Stack and an Array?

Stack
 Stack is a dynamic object whose size is constantly changing as items are pushed and popped .
 Stack may contain different data types.
 Stack is declared as a structure containing an array to hold the element of the stack, and an integer to indicate the current stack top within the array.
 Stack is a ordered collection of items.

Array
 Array is an ordered collection of items.
 Array is a static object.
 It contains same data types.
 Array can be home of a stack i.e. array can be declared large enough for maximum size of the stack.


13. What is sequential search?

In sequential search each item in the array is compared with the item being searched until a match occurs. It
is applicable to a table organized either as an array or as a linked list.


14. What is a priority queue?

The priority queue is a data structure in which the intrinsic ordering of the elements.


15. What actions are performed when a function is called?

When a function is called
 arguments are passed
 local variables are allocated and initialized
 transferring control to the function


16. Define circular list?

In linear list the next field of the last node contain a null pointer, when a next field in the last node contain a
pointer back to the first node it is called circular list.


17. What does abstract Data Type Mean?

Data type is a collection of values and a set of operations on these values. Abstract data type refer to the
mathematical concept that define the data type.


18. In RDBMS, what is the efficient data structure used in the internal storage representation?

B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searching easier. This
corresponds to the records that shall be stored in leaf nodes.


19. What do you mean by recursive definition?

The definition which defines an object in terms of simpler cases of itself is called recursive definition.


20. What do you mean by overflow and underflow?

When new data is to be inserted into the data structure but there is no available space i.e.free storage list is
empty this situation is called overflow. When we want to delete data from a data structure that is empty this situation is called underflow.


21. Define double linked list?

It is a collection of data elements called nodes, where each node is divided into three parts
 An info field that contains the information stored in the node.
 Left field that contain pointer to node on left side.
 Right field that contain pointer to node on right side.

couch mode print story

Networking Interview Question and Answers


1. Define Network, Link and Node?

A network is a set of devices connected by physical media links. A network is recursively is a connection of two or more nodes by a physical link or two or more networks connected by one or more nodes.


2. What is a gateway or Router?

A node that is connected to two or more networks is commonly called as router or Gateway. It generally
forwards message from one network to another.


3. What is point-point link?

If the physical links are limited to a pair of nodes it is said to be point-point link.


4. What is subnet?

A generic term for section of a large networks usually separated by a bridge or router.


5. Difference between the communication and transmission.

Transmission is a physical movement of information and concern issues like bit polarity, synchronisation, clock
etc. Communication means the meaning full exchange of information between two communication media.


6. What are the advantages of Distributed Processing?

a. Security/Encapsulation
b. Distributed database
c. Faster Problem solving
d. Security through redundancy
e. Collaborative Processing


7. What is passive topology?

When the computers on the network simply listen and receive the signal, they are referred to as passive
because they don’t amplify the signal in any way. Example for passive topology - linear bus.


8. What are the possible ways of data exchange?

(i) Simplex
(ii) Half-duplex
(iii) Full-duplex. .


9. What is Protocol?

A protocol is a set of rules that govern all aspects of information communication.


10. Explain the function of Transmission Control Block.

A TCB is a complex data structure that contains a considerable amount of information about each connection.


11. What is a Management Information Base (MIB)?

A Management Information Base is part of every SNMP-managed device. Each SNMP agent has the MIB
database that contains information about the device’s status, its performance, connections, and configuration.
The MIB is queried by SNMP.


12. What is Beaconing?

The process that allows a network to self-repair networks problems. The stations on the network notify the
other stations on the ring when they are not receiving the transmissions. Beaconing is used in Token ring and
FDDI networks.


13. Define Bandwidth and Latency?

Network performance is measured in Bandwidth (throughput) and Latency (Delay). Bandwidth of a network is given by the number of bits that can be transmitted over the network in a certain period of time. Latency
corresponds to how long it t5akes a message to travel from one end off a network to the other. It is strictly
measured in terms of time.


14. Define Routing?

The process of determining systematically hoe to forward messages toward the destination nodes based on its address is called routing.


15. When a switch is said to be congested?

It is possible that a switch receives packets faster than the shared link can accommodate and stores in its
memory, for an extended period of time, then the switch will eventually run out of buffer space, and some
packets will have to be dropped and in this state is said to congested state.


16. What is semantic gap?

Defining a useful channel involves both understanding the applications requirements and recognizing the
limitations of the underlying technology. The gap between what applications expects and what the underlying
technology can provide is called semantic gap.


17. What is Multiplexing?

Multiplexing is the set of techniques that allows the simultaneous transmission of multiple signals across a
single data link.


18. What does the Mount protocol do ?

The Mount protocol returns a file handle and the name of the file system in which a requested file resides. The message is sent to the client from the server after reception of a client’s request.


19. What is a DNS resource record?

A resource record is an entry in a name server’s database. There are several types of resource records used,
including name-to-address resolution information. Resource records are maintained as ASCII files.


20. What protocol is used by DNS name servers?

DNS uses UDP for communication between servers. It is a better choice than TCP because of the improved
speed a connectionless protocol offers. Of course, transmission reliability suffers with UDP.

couch mode print story

PHP Interview Questions and Answers


1. What's PHP ?

The PHP Hypertext Preprocessor is a programming language that allows web developers to create dynamic
content that interacts with databases. PHP is basically used for developing web based software applications.
PHP development began in 1994 when the Danish/Greenlandic programmer Rasmus Lerdorf initially created
a set of Perl scripts he called "Personal Home Page Tools" to maintain his personal homepage. Marco Tabini is the funder an publisher of PHP|architech.


2. What is Full form of PHP ? Who is the father or inventor of PHP ?

Rasmus Lerdorf is known as the father of PHP that started development of PHP in 1994 for their own Personal Home Page (PHP) and they released PHP/FI (Forms Interpreter) version 1.0 publicly on 8 June 1995 But in 1997 two Israeli developers named Zeev Suraski and Andi Gutmans rewrote the parser that formed the base of PHP 3 and then changed the language's name to the PHP: Hypertext Preprocessor.


3. What Is a Session?

A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests. There is only one session object available to your PHP scripts at any time. Data saved to the session by a script can be retrieved by the same script or another script when requested from the same visitor. Sessions are commonly used to store temporary data to allow multiple PHP pages to offer a complete functional transaction for the same visitor.


4. What are the method available in form submitting?

GET and POST.


5. How can we submit from without a submit button?

The main idea behind this to use a simple JavaScript code linked to an event trigger of any form field. In the
JavaScript code, we can call the document.form.submit(); function to submit the form.


6. How to include a file to a php page?

We can include a file using "include() " or "require()" function with file path as its parameter.


7. What's the difference between include and require?

If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is
not found by include(), a warning will be issued, but execution will continue.


8. Differences between GET and POST methods ?

We can send 1024 bytes using GET method but OOSt method can transfer large amount of data and POST is the secure method than GET method .


9. What are the different functions in sorting an array?

asort()
arsort()
ksort()
krsort()
uksort()
sort()
natsort()
rsort()


10. How we can retrieve the data in the result set of MySQL using PHP?

1. mysql_fetch_row
2. mysql_fetch_array
3. mysql_fetch_object
4. mysql_fetch_assoc


11. Explain include(), include_once, require() and require_once.

include()
The include() function takes all the content in a specified file and includes it in the current file. If an error occurs, the include() function generates a warning, but the script will continue execution.
include_once()
File will not be included more than once. If we want to include a file once only and further calling of the file
will be ignored then we have to use the PHP function include_once().
require()
The require() function is identical to include(), except that it handles errors differently. The require() generates
a fatal error, and the script will stop.
require_once()
The required file is called only once when a page is open and further calling of the file will be ignored.


12. How can I execute a PHP script using command line?

Just run the PHP CLI (Command Line Interface) program and provide the PHP script file name as the
command line argument. For example, "php myScript.php", assuming "php" is the command to invoke the CLI program. Be aware that if your PHP script was written for the Web CGI interface, it may not execute properly in command line environment.


13. Difference between mysql_connect and mysql_pconnect?

There is a good page in the php manual on the subject, in short mysql_pconnect() makes a persistent
connection to the database which means a SQL link that do not close when the execution of your script ends.
mysql_connect()provides only for the databasenewconnection while using mysql_pconnect , the function
would first try to find a (persistent) link that's already open with the same host, username and password. If
one is found, an identifier for it will be returned instead of opening a new connection... the connection to the
SQL server will not be closed when the execution of the script ends. Instead, the link will remain open for
future use.


14. What is the difference between $var and $$var?

They are both variables. But $var is a variable with a fixed name. $$var is a variable who's name is stored in
$var. For example, if $var contains "message", $$var is the same as $message.


15. What is the difference between the functions unlink and unset?

unlink() deletes the given file from the file system.
unset() makes a variable undefined.


16. What is the difference between PHP4 and PHP5?

PHP4 cannot support oops concepts and Zend engine 1 is used.
PHP5 supports oops concepts and Zend engine 2 is used. Error supporting is increased in PHP5. XML and
SQLLite will is increased in PHP5.


17. What are the differences between mysql_fetch_array(), mysql_fetch_object(),

mysql_fetch_row()?
mysql_fetch_array:
Fetch a result row as an associative array and a numeric array.
mysql_fetch_object:
Returns an object with properties that correspond to the fetched row and moves the internal data pointer
ahead. Returns an object with properties that correspond to the fetched row, or FALSE if there are no more
rows.
mysql_fetch_row():
Fetches one row of data from the result associated with the specified result identifier. The row is returned as
an array. Each result column is stored in an array offset, starting at offset 0.


18. How to delete a file from the system?

Unlink() deletes the given file from the file system.


19. what is sql injection ?

SQL injection is a malicious code injection technique.It exploiting SQL vulnerabilities in Web applications


20. What is PEAR?

PEAR is a framework and distribution system for reusable PHP components.The project seeks to provide a
structured library of code, maintain a system for distributing code and for managing code packages, and
promote a standard coding style.PEAR is broken into three classes: PEAR Core Components, PEAR Packages, and PECL Packages. The Core Components include the base classes of PEAR and PEAR_Error, along with database, HTTP, logging, and e-mailing functions. The PEAR Packages include functionality providing for authentication, networking, and file system features, as well as tools for working with XML and HTML templates.

couch mode print story

Database Management System Interview Questions and Answers

Database Management System Interview Questions and Answers

1. What is database?

A database is a collection of information that is organized. So that it can easily be accessed, managed, and updated.
OR
A database is a collection of related data .A database is a logically coherent collection of data with some inherent meaning.


2. What is DBMS?

DBMS stands for Database Management System. It is a collection of programs that enables user to create and maintain a database.A DBMS receives requests from applications and translates those requests into actions on a specific database. A DBMS processes SQL tatements or uses other functionality to create, process and administer databases.


3. What are the advantages of DBMS?

I. Redundancy is controlled.
II. Providing multiple user interfaces.
III. Providing backup and recovery
IV. Unauthorized access is restricted.
V. Enforcing integrity constraints.


4. What is SQL, and why is it important?

SQL stands for Structured Query Language, and is the most important data processing language in use today.
It is not a complete programming language like Java or C#, but a data sublanguage used for creating and
processing database data and metadata. All DBMS products today use SQL.


5. What is a Catalog?

A catalog is a table that contain the information such as structure of each file , the type and storage format of each data item and various constraints on the data .
The information stored in the catalog is called Metadata . Whenever a request is made to access a particular data, the DBMS s/w refers to the catalog to determine the structure of the file.


6. What’s difference between DBMS and RDBMS ?

DBMS provides a systematic and organized way of storing, managing and retrieving from collection of logically related information. RDBMS also provides what DBMS provides but above that it provides relationship integrity.
So in short we can say
RDBMS = DBMS + REFERENTIAL INTEGRITY
These relations are defined by using “Foreign Keys” in any RDBMS.Many DBMS companies claimed there DBMS product was a RDBMS compliant, but according to industry rules and regulations if the DBMS fulfills the twelve CODD rules it’s truly a RDBMS. Almost all DBMS (SQL SERVER, ORACLE etc) fulfills all the twelve CODD rules and are considered as truly RDBMS.


7. What are E-R diagrams?

E-R diagram also termed as Entity-Relationship diagram shows relationship between various tables in the
database. .


8. How many types of relationship exist in database designing?

There are three major relationship models:-
One-to-one
One-to-many
Many-to-many


9. What is normalization?

It is a process of analysing the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the properties
(1).Minimizing redundancy,
(2). Minimizing insertion, deletion and update anomalies.


10. What is Data Model?

A collection of conceptual tools for describing data, data relationships data semantics and constraints.


11. What is an SQL subquery?

An SQL subquery is a means of querying two or more tables at the same time. The subquery itself is an SQL
SELECT statement contained within the WHERE clause of another SQL SELECT statement, and separated by being enclosed in parenthesis. Some subqueries have equivalent SQL join structures, but correlated subqueries cannot be duplicated by a join.


12. What is Object Oriented model?

This model is based on collection of objects. An object contains values stored in instance variables with in the object. An object also contains bodies of code that operate on the object. These bodies of code are called methods. Objects that contain same types of values and the same methods are grouped together into classes.


13. What is an Entity?

An entity is a thing or object of importance about which data must be captured.


14. What is DDL (Data Definition Language)?

A data base schema is specifies by a set of definitions expressed by a special language called DDL.


15. What is DML (Data Manipulation Language)?

This language that enable user to access or manipulate data as organised by appropriate data model. Procedural DML or Low level:
DML requires a user to specify what data are needed and how to get those data. Non-Procedural DML or High level: DML requires a user to specify what data are needed without specifying how to get those data.


16. What is a foreign key, and what is it used for?

A foreign key is used to establish relationships among relations in the relational model. Technically, a foreign
key is a column (or columns) appearing in one relation that is (are) the primary key of another table. Although there may be exceptions, the values in the foreign key columns usually must correspond to values existing in the set of primary key values. This correspondence requirement is created in a database using a referential integrity constraint on the foreign key.


17. What is 1 NF (Normal Form)?

The first normal form or 1NF is the first and the simplest type of normalization that can be implemented in a database. The main aims of 1NF are to:
1. Eliminate duplicative columns from the same table.
2. Create separate tables for each group of related data and identify each row with a unique column (the primary key).


18. What is 2NF?

A relation schema R is in 2NF if it is in 1NF and every non-prime attribute A in R is fully functionally dependent on primary key.


19. What is 3NF?

A relation is in third normal form if it is in Second Normal Form and there are no functional (transitive) dependencies between two (or more) non-primary key attributes.


20. What is BCNF (Boyce-Codd Normal Form)?

A table is in Boyce-Codd normal form (BCNF) if and only if it is in 3NF and every determinant is a candidate key.


21. What is 4NF?

Fourth normal form requires that a table be BCNF and contain no multi-valued dependencies.


22. What is 5NF?

A table is in fifth normal form (5NF) or Project-Join Normal Form (PJNF) if it is in 4NF and it cannot have a lossless decomposition into any number of smaller tables.


23. What is Functional Dependency?

Functional Dependency is the starting point of normalization. Functional Dependency exists when a relation between two attributes allows you to uniquely determine the corresponding attribute’s value.


24. What is Fully Functional dependency?

A functional dependency X Y is full functional dependency if removal of any attribute A from X means that the dependency does not hold any more.


25. Define and discuss data constraints.

Data constraints on a column are the limits put on the values the data can have. There are four types of data
constraints:
(1) domain constraints, which define a limited set of values for the column,
(2) range constraints, which specify that the values must fall within a certain range,
(3) intrarelation constraints, which define what values the column can have based on values of other columns
in the same table, and
(4) interrelation constraints, which define values the column can have based on values of columns in other
tables.

couch mode print story

Java Programming Interview Questions and Answers

Java Programming Interview Questions

1. What is JVM?

JVM is Java Virtual Machine which is a run time environment for the compiled java class files.
OR
The Java interpreter along with the runtime environment required to run the Java application in called as Java virtual machine(JVM)


2. What is the most important feature of Java?

Java is a platform independent language.


3. What do you mean by platform independence?

Platform independence means that we can write and compile the java code in one platform (eg Windows) and can execute the class in any other supported platform eg (Linux,Solaris,etc).


4. What is the difference between a JDK and a JVM?

JDK is Java Development Kit which is for development purpose and it includes execution environment also. But JVM is purely a run time environment and hence you will not be able to compile your source files using a JVM.


5. What is a pointer and does Java support pointers?

Pointer is a reference handle to a memory location. Improper handling of pointers leads to memory leaks and
reliability issues hence Java doesn't support the usage of pointers.


6. What is the base class of all classes?

java.lang.Object


7. What are the access modifiers in Java?

here are 3 access modifiers.
Public,
protected and
private,
and the default one if no identifier is specified is called friendly, but programmer cannot specify the friendly identifier explicitly.


8. Does Java support multiple inheritance?

Java doesn't support multiple inheritance.


9. Is Java a pure object oriented language?

Java uses primitive data types and hence is not a pure object oriented language.


10. What is are packages?

A package is a collection of related classes and interfaces providing access protection and namespace management.


11. What is meant by Inheritance and what are its advantages?

Inheritance is the process of inheriting all the features from a class. The advantages of inheritance are reusability of code and accessibility of variables and methods of the super class by subclasses.


12. Are arrays primitive data types?

In Java, Arrays are objects.


13. What is difference between Path and Classpath?

Path and Classpath are operating system level environment variales. Path is used define where the system can find the executables(.exe) files and classpath is used to specify the location .class files.


14. What is the difference between superclass and subclass?

A super class is a class that is inherited whereas sub class is a class that does the inheriting.


15. What are local variables?

Local varaiables are those which are declared within a block of code like methods. Local variables should be initialised before accessing them.


16. What is an abstract class?

An abstract class is a class designed with implementation gaps for subclasses to fill in and is deliberately incomplete.


17. What are instance variables?

Instance variables are those which are defined at the class level. Instance variables need not be initialized
before using them as they are automatically initialized to their default values.


18. What is synchronization?

Synchronization is the mechanism that ensures that only one thread is accessed the resources at a time.


19. What is an applet?

Applet is a dynamic and interactive program that runs inside a web page displayed by a java capable browser


20. What is the lifecycle of an applet?

init() method - Can be called when an applet is first loaded
start() method - Can be called each time an applet is started.
paint() method - Can be called when the applet is minimized or maximized.
stop() method - Can be used when the browser moves off the applet’s page.
destroy() method - Can be called when the browser is finished with the applet.

couch mode print story

C Programming Interview Questions and Answers

C Programming Interview Questions answers

1. What is C language?

The C programming language is a standardized programming language developed in the early 1970s by Ken
Thompson and Dennis Ritchie for use on the UNIX operating system. It has since spread to many other
operating systems, and is one of the most widely used programming languages. C is prized for its efficiency,
and is the most popular programming language for writing system software, though it is also used for writing
applications.


2. What are the different storage classes in C?

C has three types of storage: automatic, static and allocated. Variable having block scope and
without static specifier have automatic storage duration.
Variables with block scope, and with static specifier have static scope. Global variables (i.e, file scope)
with or without the the static specifier also have static scope. Memory obtained from calls to
malloc(), alloc() or realloc() belongs to allocated storage class.


3. What is a pointer?

Pointers are variables which stores the address of another variable. That variable may be a scalar (including
another pointer), or an aggregate (array or structure). The pointed-to object may be part of a larger object,
such as a field of a structure or an element in an array.


4. What is the purpose of main() function?

The function main() invokes other functions within it.It is the first function to be called when the
program starts execution.
 It is the starting function.
 It returns an int value to the environment that called the program.
 Recursive call is allowed for main( ) also.
 It is a user-defined function.


5. What are the uses of a pointer?

Pointer is used in the following cases
 It is used to access array elements.
 It is used for dynamic memory allocation.
 It is used in Call by reference.
 It is used in data structures like trees, graph, linked list etc.

<--break-->
6. What does static variable mean?

There are 3 main uses for the static.
1. If you declare within a function:
It retains the value between function calls
2.If it is declared for a function name:
By default function is extern..so it will be visible from other files if the function declaration is as
static..it is invisible for the outer files
3. Static for global variables:
By default we can use the global variables from outside files If it is static global..that variable is limited
to with in the file


7. Can static variables be declared in a header file?

You can’t declare a static variable without defining it as well (this is because the storage class modifiers static
and extern are mutually exclusive). A static variable can be defined in a header file, but this would cause each
source file that included the header file to have its own private copy of the variable, which is probably not
what was intended.


8. What is a structure?

Structure constitutes a super data type which represents several different data types in a single unit. A
structure can be initialized if it is static or global.


9. What is message passing?

An object oriented program consists of a set of objects that communicate with each other. Message passing
involves specifying the name of the object, the name of the function and the information to be sent.


10. What is a macro?

Macros are the identifiers that represent statements or expressions. To associate meaningful identifiers with
constants, keywords, and statements or expressions.


11. How can you determine the size of an allocated portion of memory?

You can’t, really. free() can , but there’s no way for your program to know the trick free() uses. Even if you
disassemble the library and discover the trick, there’s no guarantee the trick won’t change with the next release
of the compiler.


12. What is a null pointer?

There are times when it’s necessary to have a pointer that doesn’t point to anything. The macro
NULL, defined in , has a value that’s guaranteed to be different from any valid pointer. NULL is a
literal zero, possibly cast to void* or char*.
Some people, notably C++ programmers, prefer to use 0 rather than NULL.
The null pointer is used in three ways:
1) To stop indirection in a recursive data structure.
2) As an error value.
3) As a sentinel value.


13. What is static memory allocation and dynamic memory allocation?

Static memory allocation: The compiler allocates the required memory space for a declared
variable.By using the address of operator,the reserved address is obtained and this address may be
assigned to a pointer variable.Since most of the declared variable have static memory,this way of
assigning pointer value to a pointer variable is known as static memory allocation. memory is
assigned during compilation time.
Dynamic memory allocation: It uses functions such as malloc( ) or calloc( ) to get memory
dynamically.If these functions are used to get memory dynamically and the values returned by these
functions are assingned to pointer variables, such assignments are known as dynamic memory
allocation.memory is assined during run time.


14. Difference between const char* p and char const* p

In const char* p, the character pointed by ‘p’ is constant, so u cant change the value of character
pointed by p but u can make ‘p’ refer to some other location.
In char const* p, the ptr ‘p’ is constant not the character referenced by it, so u cant make ‘p’ to
reference to any other location but u can change the value of the char pointed by ‘p’.


15. What is the quickest sorting method to use?

The answer depends on what you mean by quickest. For most sorting problems, it just doesn’t
matter how quick the sort is because it is done infrequently or other operations take significantly
more time anyway. There are three sorting methods in this author’s toolbox that are all very fast and
that are useful in different situations. Those methods are quick sort, merge sort, and radix sort.


16. What are the differences between structures and union?

A structure variable contains each of the named members, and its size is large enough to hold all
the members. Structure elements are of same size.
A Union contains one of the named members at a given time and is large enough to hold the largest
member. Union element can be of different sizes.


17. What is the difference between arrays and pointers?

Array is collection of similar datatype. it is a static memory allocation means we can not increment
and decrement the arry size once we allocated. and we can not increment the base address, reassign
address.
Pointer is a dynamic memory allocation. we can allocate the size as we want, assigning into another
variable and base address incrementation is allowed.


18. What is the difference between class and structure?

 By default, the members ot structures are public while that tor class is private.
 structures doesn’t provide something like data hiding which is provided by the classes.
 structures contains only data while class bind both data and member functions.


19. What is the difference between ordinary variable and pointer in C?

An ordinary variable is like a container it can hold any value and we can change the value of ordinary variable
at a time throughout the program .A pointer is a variable that stores the address of another Variable.


20. What are the techniques you use for debugging?

(i)Using compiler’s features
(ii)Read The Fine Module
(iii)printf( ) debugging
(iv)Code grinding
(v)Assertion