Tuesday 9 October 2012

Oracle Interview Questions And Answers




What are the advantages of views?
- Provide an additional level of table security, by restricting access to a predetermined set of rows and columns of a table.
- Hide data complexity.
- Simplify commands for the user.
- Present the data in a different perspective from that of the base table.
- Store complex queries.


What is an Oracle sequence?
A sequence generates a serial list of unique numbers for numerical columns of a database's tables.


What is a synonym?
A synonym is an alias for a table, view, sequence or program unit.


What are the types of synonyms?
There are two types of synonyms private and public.


What is a private synonym?
Only its owner can access a private synonym.


What is a public synonym?
Any database user can access a public synonym.


What are synonyms used for?
- Mask the real name and owner of an object.
- Provide public access to an object
- Provide location transparency for tables, views or program units of a remote database.
- Simplify the SQL statements for database users.


What is an Oracle index?
An index is an optional structure associated with a table to have direct access to rows, which can be created to increase the performance of data retrieval. Index can be created on one or more columns of a table.


How are the index updates?
Indexes are automatically maintained and used by Oracle. Changes to table data are automatically incorporated into all relevant indexes.


What is a Tablespace?
A database is divided into Logical Storage Unit called tablespace. A tablespace is used to grouped related logical structures together


What is Rollback Segment ?
A Database contains one or more Rollback Segments to temporarily store "undo" information.


What are the Characteristics of Data Files ?
A data file can be associated with only one database. Once created a data file can't change size. One or more data files form a logical unit of database storage called a tablespace.


How to define Data Block size ?
A data block size is specified for each ORACLE database when the database is created. A database users and allocated free database space in ORACLE data blocks. Block size is specified in INIT.ORA file and can’t be changed latter.


What does a Control file Contain ?
A Control file records the physical structure of the database. It contains the following information.
Database Name
Names and locations of a database's files and redolog files.
Time stamp of database creation.


What is difference between UNIQUE constraint and PRIMARY KEY constraint ?
A column defined as UNIQUE can contain Nulls while a column defined as PRIMARY KEY can't contain Nulls.


What is Index Cluster ?
A Cluster with an index on the Cluster Key


When does a Transaction end ?
When it is committed or Rollbacked.


What is the effect of setting the value "ALL_ROWS" for OPTIMIZER_GOAL parameter of the ALTER SESSION command ? What are the factors that affect OPTIMIZER in choosing an Optimization approach ?
Answer The OPTIMIZER_MODE initialization parameter Statistics in the Data Dictionary the OPTIMIZER_GOAL parameter of the ALTER SESSION command hints in the statement.


What is the effect of setting the value "CHOOSE" for OPTIMIZER_GOAL, parameter of the ALTER SESSION Command ?
The Optimizer chooses Cost_based approach and optimizes with the goal of best throughput if statistics for atleast one of the tables accessed by the SQL statement exist in the data dictionary. Otherwise the OPTIMIZER chooses RULE_based approach.


How does one create a new database? (for DBA)
One can create and modify Oracle databases using the Oracle "dbca" (Database Configuration Assistant) utility. The dbca utility is located in the $ORACLE_HOME/bin directory. The Oracle Universal Installer (oui) normally starts it after installing the database server software.
One can also create databases manually using scripts. This option, however, is falling out of fashion, as it is quite involved and error prone. Look at this example for creating and Oracle 9i database:
CONNECT SYS AS SYSDBA
ALTER SYSTEM SET DB_CREATE_FILE_DEST='/u01/oradata/';
ALTER SYSTEM SET DB_CREATE_ONLINE_LOG_DEST_1='/u02/oradata/';
ALTER SYSTEM SET DB_CREATE_ONLINE_LOG_DEST_2='/u03/oradata/';
CREATE DATABASE;


What database block size should I use? (for DBA)
Oracle recommends that your database block size match, or be multiples of your operating system block size. One can use smaller block sizes, but the performance cost is significant. Your choice should depend on the type of application you are running. If you have many small transactions as with OLTP, use a smaller block size. With fewer but larger transactions, as with a DSS application, use a larger block size. If you are using a volume manager, consider your "operating system block size" to be 8K. This is because volume manager products use 8K blocks (and this is not configurable).


What are the different approaches used by Optimizer in choosing an execution plan ?
Rule-based and Cost-based.


What does ROLLBACK do ?
ROLLBACK retracts any of the changes resulting from the SQL statements in the transaction.


How does one coalesce free space ? (for DBA)
SMON coalesces free space (extents) into larger, contiguous extents every 2 hours and even then, only for a short period of time.
SMON will not coalesce free space if a tablespace's default storage parameter "pctincrease" is set to 0. With Oracle 7.3 one can manually coalesce a tablespace using the ALTER TABLESPACE ... COALESCE; command, until then use:
SQL> alter session set events 'immediate trace name coalesce level n';
Where 'n' is the tablespace number you get from SELECT TS#, NAME FROM SYS.TS$;
You can get status information about this process by selecting from the SYS.DBA_FREE_SPACE_COALESCED dictionary view.


How does one prevent tablespace fragmentation? (for DBA)
Always set PCTINCREASE to 0 or 100.
Bizarre values for PCTINCREASE will contribute to fragmentation. For example if you set PCTINCREASE to 1 you will see that your extents are going to have weird and wacky sizes: 100K, 100K, 101K, 102K, etc. Such extents of bizarre size are rarely re-used in their entirety. PCTINCREASE of 0 or 100 gives you nice round extent sizes that can easily be reused. E.g.. 100K, 100K, 200K, 400K, etc.

Use the same extent size for all the segments in a given tablespace. Locally Managed tablespaces (available from 8i onwards) with uniform extent sizes virtually eliminates any tablespace fragmentation. Note that the number of extents per segment does not cause any performance issue anymore, unless they run into thousands and thousands where additional I/O may be required to fetch the additional blocks where extent maps of the segment are stored.


Where can one find the high water mark for a table? (for DBA)
There is no single system table, which contains the high water mark (HWM) for a table. A table's HWM can be calculated using the results from the following SQL statements:
SELECT BLOCKS
FROM DBA_SEGMENTS
WHERE OWNER=UPPER(owner) AND SEGMENT_NAME = UPPER(table);
ANALYZE TABLE owner.table ESTIMATE STATISTICS;
SELECT EMPTY_BLOCKS
FROM DBA_TABLES
WHERE OWNER=UPPER(owner) AND SEGMENT_NAME = UPPER(table);
Thus, the tables' HWM = (query result 1) - (query result 2) - 1
NOTE: You can also use the DBMS_SPACE package and calculate the HWM = TOTAL_BLOCKS - UNUSED_BLOCKS - 1.


What is COST-based approach to optimization ?
Considering available access paths and determining the most efficient execution plan based on statistics in the data dictionary for the tables accessed by the statement and their associated clusters and indexes.


What does COMMIT do ?
COMMIT makes permanent the changes resulting from all SQL statements in the transaction. The changes made by the SQL statements of a transaction become visible to other user sessions transactions that start only after transaction is committed.


How are extents allocated to a segment? (for DBA)
Oracle8 and above rounds off extents to a multiple of 5 blocks when more than 5 blocks are requested. If one requests 16K or 2 blocks (assuming a 8K block size), Oracle doesn't round it up to 5 blocks, but it allocates 2 blocks or 16K as requested. If one asks for 8 blocks, Oracle will round it up to 10 blocks.
Space allocation also depends upon the size of contiguous free space available. If one asks for 8 blocks and Oracle finds a contiguous free space that is exactly 8 blocks, it would give it you. If it were 9 blocks, Oracle would also give it to you. Clearly Oracle doesn't always round extents to a multiple of 5 blocks.
The exception to this rule is locally managed tablespaces. If a tablespace is created with local extent management and the extent size is 64K, then Oracle allocates 64K or 8 blocks assuming 8K-block size. Oracle doesn't round it up to the multiple of 5 when a tablespace is locally managed.


Can one rename a database user (schema)? (for DBA)
No, this is listed as Enhancement Request 158508. Workaround:
Do a user-level export of user A
create new user B
Import system/manager fromuser=A touser=B
Drop user A

Oracle Interview Questions And Answers



What are the components of physical database structure of Oracle database?
Oracle database is comprised of three types of files. One or more datafiles, two are more redo log files, and one or more control files.


What are the components of logical database structure of Oracle database?
There are tablespaces and database's schema objects.


What is a tablespace?
A database is divided into Logical Storage Unit called tablespaces. A tablespace is used to grouped related logical structures together.


What is SYSTEM tablespace and when is it created?
Every Oracle database contains a tablespace named SYSTEM, which is automatically created when the database is created. The SYSTEM tablespace always contains the data dictionary tables for the entire database.


Explain the relationship among database, tablespace and data file ?
Each databases logically divided into one or more tablespaces one or more data files are explicitly created for each tablespace.


What is schema?
A schema is collection of database objects of a user.


What are Schema Objects?
Schema objects are the logical structures that directly refer to the database's data. Schema objects include tables, views, sequences, synonyms, indexes, clusters, database triggers, procedures, functions packages and database links.


Can objects of the same schema reside in different tablespaces?

Yes.


Can a tablespace hold objects from different schemes?
Yes.


What is Oracle table?
A table is the basic unit of data storage in an Oracle database. The tables of a database hold all of the user accessible data. Table data is stored in rows and columns.


What is an Oracle view?
A view is a virtual table. Every view has a query attached to it. (The query is a SELECT statement that identifies the columns and rows of the table(s) the view uses.)


What is Partial Backup ?
A Partial Backup is any operating system backup short of a full backup, taken while the database is open or shut down.


What is Mirrored on-line Redo Log ?
A mirrored on-line redo log consists of copies of on-line redo log files physically located on separate disks, changes made to one member of the group are made to all members


What is Full Backup ?
A full backup is an operating system backup of all data files, on-line redo log files and control file that constitute ORACLE database and the parameter.


Can a View based on another View ?
Yes.


Can a Tablespace hold objects from different Schemes ?
Yes.


Can objects of the same Schema reside in different tablespace ?
Yes.


What is the use of Control File ?
When an instance of an ORACLE database is started, its control file is used to identify the database and redo log files that must be opened for database operation to proceed. It is also used in database recovery.


Do View contain Data ?
Views do not contain or store data.


What are the Referential actions supported by FOREIGN KEY integrity constraint ?
UPDATE and DELETE Restrict - A referential integrity rule that disallows the update or deletion of referenced data. DELETE Cascade - When a referenced row is deleted all associated dependent rows are deleted.


What are the type of Synonyms?
There are two types of Synonyms Private and Public.


What is a Redo Log ?
The set of Redo Log files YSDATE,UID,USER or USERENV SQL functions, or the pseudo columns LEVEL or ROWNUM.


What is an Index Segment ?
Each Index has an Index segment that stores all of its data.


Explain the relationship among Database, Tablespace and Data file?
Each databases logically divided into one or more tablespaces one or more data files are explicitly created for each tablespace


What are the different type of Segments ?
Data Segment, Index Segment, Rollback Segment and Temporary Segment.


What are Clusters ?
Clusters are groups of one or more tables physically stores together to share common columns and are often used together.


What is an Integrity Constrains ?
An integrity constraint is a declarative way to define a business rule for a column of a table.


What is an Index ?
An Index is an optional structure associated with a table to have direct access to rows, which can be created to increase the performance of data retrieval. Index can be created on one or more columns of a table.


What is an Extent ?
An Extent is a specific number of contiguous data blocks, obtained in a single allocation, and used to store a specific type of information.


What is a View ?
A view is a virtual table. Every view has a Query attached to it. (The Query is a SELECT statement that identifies the columns and rows of the table(s) the view uses.)


What is Table ?
A table is the basic unit of data storage in an ORACLE database. The tables of a database hold all of the user accessible data. Table data is stored in rows and columns.

Dot Net Interview Questions



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.

1. 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.

2. 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.

3. How ASP .NET different from ASP?
Scripting is separated from the HTML, Code is compiled as a DLL, these DLLs can be executed on the server.

4. 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.

5. 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

6. 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.

7. Can the validation be done in the server side? Or this can be done only in the Client side?
Client side is done by default. Server side validation is also possible. We can switch off the client side and server side can be done.

8. How to manage pagination in a page?
Using pagination option in DataGrid control. We have to set the number of records for a page, then it takes care of pagination by itself.

9. 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.

11. Observations between VB.NET and VC#.NET?
Choosing a programming language depends on your language experience and the scope of the application you are building. While small applications are often created using only one language, it is not uncommon to develop large applications using multiple languages.

For example, if you are extending an application with existing XML Web services, you might use a scripting language with little or no programming effort. For client-server applications, you would probably choose the single language you are most comfortable with for the entire application. For new enterprise applications, where large teams of developers create components and services for deployment across multiple remote sites, the best choice might be to use several languages depending on developer skills and long-term maintenance expectations.

The .NET Platform programming languages - including Visual Basic .NET, Visual C#, and Visual C++ with managed extensions, and many other programming languages from various vendors - use .NET Framework services and features through a common set of unified classes. The .NET unified classes provide a consistent method of accessing the platform's functionality. If you learn to use the class library, you will find that all tasks follow the same uniform architecture. You no longer need to learn and master different API architectures to write your applications.

In most situations, you can effectively use all of the Microsoft programming languages. Nevertheless, each programming language has its relative strengths and you will want to understand the features unique to each language. The following sections will help you choose the right programming language for your application.

Visual Basic .NET

Visual Basic .NET is the next generation of the Visual Basic language from Microsoft. With Visual Basic you can build .NET applications, including Web services and ASP.NET Web applications, quickly and easily. Applications made with Visual Basic are built on the services of the common language runtime and take advantage of the .NET Framework.

Visual Basic has many new and improved features such as inheritance, interfaces, and overloading that make it a powerful object-oriented programming language. Other new language features include free threading and structured exception handling. Visual Basic fully integrates the .NET Framework and the common language runtime, which together provide language interoperability, garbage collection, enhanced security, and improved versioning support. A Visual Basic support single inheritance and creates Microsoft intermediate language (MSIL) as input to native code compilers.

Visual Basic is comparatively easy to learn and use, and Visual Basic has become the programming language of choice for hundreds of thousands of developers over the past decade. An understanding of Visual Basic can be leveraged in a variety of ways, such as writing macros in Visual Studio and providing programmability in applications such as Microsoft Excel, Access, and Word.

Visual Basic provides prototypes of some common project types, including:

• Windows Application.
• Class Library.
• Windows Control Library.
• ASP.NET Web Application.
• ASP.NET Web Service.
• Web Control Library.
• Console Application.
• Windows Service.
• Windows Service.

Visual C# .NET

Visual C# (pronounced C sharp) is designed to be a fast and easy way to create .NET applications, including Web services and ASP.NET Web applications. Applications written in Visual C# are built on the services of the common language runtime and take full advantage of the .NET Framework.

C# is a simple, elegant, type-safe, object-oriented language recently developed by Microsoft for building a wide range of applications. Anyone familiar with C and similar languages will find few problems in adapting to C#. C# is designed to bring rapid development to the C++ programmer without sacrificing the power and control that are a hallmark of C and C++. Because of this heritage, C# has a high degree of fidelity with C and C++, and developers familiar with these languages can quickly become productive in C#. C# provides intrinsic code trust mechanisms for a high level of security, garbage collection, and type safety. C# supports single inheritance and creates Microsoft intermediate language (MSIL) as input to native code compilers.

C# is fully integrated with the .NET Framework and the common language runtime, which together provide language interoperability, garbage collection, enhanced security, and improved versioning support. C# simplifies and modernizes some of the more complex aspects of C and C++, notably namespaces, classes, enumerations, overloading, and structured exception handling. C# also eliminates C and C++ features such as macros, multiple inheritance, and virtual base classes. For current C++ developers, C# provides a powerful, high-productivity language alternative.

Visual C# provides prototypes of some common project types, including:

• Windows Application.
• Class Library.
• Windows Control Library.
• ASP.NET Web Application.
• ASP.NET Web Service.
• Web Control Library.
• Console Application.
• Windows Service.

12. Advantages of migrating to VB.NET ?
Visual Basic .NET has many new and improved language features — such as inheritance, interfaces, and overloading that make it a powerful object-oriented programming language. As a Visual Basic developer, you can now create multithreaded, scalable applications using explicit multithreading. Other new language features in Visual Basic .NET include structured exception handling, custom attributes, and common language specification (CLS) compliance.

The CLS is a set of rules that standardizes such things as data types and how objects are exposed and interoperate. Visual Basic .NET adds several features that take advantage of the CLS. Any CLS-compliant language can use the classes, objects, and components you create in Visual Basic .NET. And you, as a Visual Basic user, can access classes, components, and objects from other CLS-compliant programming languages without worrying about language-specific differences such as data types.

CLS features used by Visual Basic .NET programs include assemblies, namespaces, and attributes.

These are the new features to be stated briefly:

Inheritance
Visual Basic .NET supports inheritance by allowing you to define classes that serve as the basis for derived classes. Derived classes inherit and can extend the properties and methods of the base class. They can also override inherited methods with new implementations. All classes created with Visual Basic .NET are inheritable by default. Because the forms you design are really classes, you can use inheritance to define new forms based on existing ones.

Exception Handling
Visual Basic .NET supports structured exception handling, using an enhanced version of the Try...Catch...Finally syntax supported by other languages such as C++.

Structured exception handling combines a modern control structure (similar to Select Case or While) with exceptions, protected blocks of code, and filters. Structured exception handling makes it easy to create and maintain programs with robust, comprehensive error handlers.

Overloading
Overloading is the ability to define properties, methods, or procedures that have the same name but use different data types. Overloaded procedures allow you to provide as many implementations as necessary to handle different kinds of data, while giving the appearance of a single, versatile procedure. Overriding Properties and Methods The Overrides keyword allows derived objects to override characteristics inherited from parent objects. Overridden members have the same arguments as the members inherited from the base class, but different implementations. A member's new implementation can call the original implementation in the parent class by preceding the member name with MyBase.

Constructors and Destructors
Constructors are procedures that control initialization of new instances of a class. Conversely, destructors are methods that free system resources when a class leaves scope or is set to Nothing. Visual Basic .NET supports constructors and destructors using the Sub New and Sub Finalize procedures.

Data Types
Visual Basic .NET introduces three new data types. The Char data type is an unsigned 16-bit quantity used to store Unicode characters. It is equivalent to the .NET Framework System. Char data type. The Short data type, a signed 16-bit integer, was named Integer in earlier versions of Visual Basic. The Decimal data type is a 96-bit signed integer scaled by a variable power of 10. In earlier versions of Visual Basic, it was available only within a Variant.

Interfaces
Interfaces describe the properties and methods of classes, but unlike classes, do not provide implementations. The Interface statement allows you to declare interfaces, while the Implements statement lets you write code that puts the items described in the interface into practice.

Delegates
Delegates objects that can call the methods of objects on your behalf are sometimes described as type-safe, object-oriented function pointers. You can use delegates to let procedures specify an event handler method that runs when an event occurs. You can also use delegates with multithreaded applications. For details, see Delegates and the AddressOf Operator.

Shared Members
Shared members are properties, procedures, and fields that are shared by all instances of a class. Shared data members are useful when multiple objects need to use information that is common to all. Shared class methods can be used without first creating an object from a class.

References
References allow you to use objects defined in other assemblies. In Visual Basic .NET, references point to assemblies instead of type libraries. For details, see References and the Imports Statement. Namespaces Namespaces prevent naming conflicts by organizing classes, interfaces, and methods into hierarchies.

Assemblies
Assemblies replace and extend the capabilities of type libraries by, describing all the required files for a particular component or application. An assembly can contain one or more namespaces.

Attributes
Attributes enable you to provide additional information about program elements. For example, you can use an attribute to specify which methods in a class should be exposed when the class is used as a XML Web service.

Multithreading
Visual Basic .NET allows you to write applications that can perform multiple tasks independently. A task that has the potential of holding up other tasks can execute on a separate thread, a process known as multithreading. By causing complicated tasks to run on threads that are separate from your user interface, multithreading makes your applications more responsive to user input.

13. Advantages of VB.NET

First of all, VB.NET provides managed code execution that runs under the Common Language Runtime (CLR), resulting in robust, stable and secure applications. All features of the .NET framework are readily available in VB.NET.

VB.NET is totally object oriented. This is a major addition that VB6 and other earlier releases didn't have.

The .NET framework comes with ADO.NET, which follows the disconnected paradigm, i.e. once the required records are fetched the connection no longer exists. It also retrieves the records that are expected to be accessed in the immediate future. This enhances Scalability of the application to a great extent.

VB.NET uses XML to transfer data between the various layers in the DNA Architecture i.e. data are passed as simple text strings.

Error handling has changed in VB.NET. A new Try-Catch-Finally block has been introduced to handle errors and exceptions as a unit, allowing appropriate action to be taken at the place the error occurred thus discouraging the use of ON ERROR GOTO statement. This again credits to the maintainability of the code.

Another great feature added to VB.NET is free threading against the VB single-threaded apartment feature. In many situations developers need spawning of a new thread to run as a background process and increase the usability of the application. VB.NET allows developers to spawn threads wherever they feel like, hence giving freedom and better control on the application.

Security has become more robust in VB.NET. In addition to the role-based security in VB6, VB.NET comes with a new security model, Code Access security. This security controls on what the code can access. For example you can set the security to a component such that the component cannot access the database. This type of security is important because it allows building components that can be trusted to various degrees.

The CLR takes care of garbage collection i.e. the CLR releases resources as soon as an object is no more in use. This relieves the developer from thinking of ways to manage memory. CLR does this for them.

14. Using ActiveX Control in .Net
ActiveX control is a special type of COM component that supports a User Interface. Using ActiveX Control in your .Net Project is even easier than using COM component. They are bundled usually in .ocx files. Again a proxy assembly is made by .Net utility AxImp.exe (which we will see shortly) which your application (or client) uses as if it is a .Net control or assembly.

Making Proxy Assembly For ActiveX Control: First, a proxy assembly is made using AxImp.exe (acronym for ActiveX Import) by writing following command on Command Prompt:

C:> AxImp C:MyProjectsMyControl.ocx

This command will make two dlls, e.g., in case of above command

MyControl.dll
AxMyControl.dll

The first file MyControl.dll is a .Net assembly proxy, which allows you to reference the ActiveX as if it were non-graphical object.
The second file AxMyControl.dll is the Windows Control, which allows u to use the graphical aspects of activex control and use it in the Windows Form Project.

Adding Reference of ActiveX Proxy Assembly in your Project Settings: To add a reference of ActiveX Proxy Assembly in our Project, do this:

o Select ProjectàAdd Reference (Select Add Reference from Project Menu).
o This will show you a dialog box, select .Net tab from the top of window.
o Click Browse button on the top right of window.
o Select the dll file for your ActiveX Proxy Assembly (which is MyControl.dll) and click OK o Your selected component is now shown in the ‘Selected Component’ List Box. Click OK again Some More On Using COM or ActiveX in .Net

.Net only provides wrapper class or proxy assembly (Runtime Callable Wrapper or RCW) for COM or activeX control. In the background, it is actually delegating the tasks to the original COM, so it does not convert your COM/activeX but just imports them.

A good thing about .Net is that when it imports a component, it also imports the components that are publically referenced by that component. So, if your component, say MyDataAcsess.dll references ADODB.dll then .Net will automatically import that COM component too!

The Visual Studio.NET does surprise you in a great deal when u see that it is applying its intellisense (showing methods, classes, interfaces, properties when placing dot) even on your imported COM components!!!! Isn’t it a magic or what?

When accessing thru RCW, .Net client has no knowledge that it is using COM component, it is presented just as another C# assembly.

U can also import COM component thru command prompt (for reference see Professional C# by Wrox)

U can also use your .Net components in COM, i.e., export your .net components (for reference see Professional C# by Wrox)

15. What is Machine.config?
Machine configuration file: The machine.config file contains settings that apply to the entire computer. This file is located in the %runtime install path%Config directory. There is only one machine.config file on a computer. The Machine.Config file found in the "CONFIG" subfolder of your .NET Framework install directory (c:WINNTMicrosoft.NETFramework{Version Number}CONFIG on Windows 2000 installations). The machine.config, which can be found in the directory $WINDIR$Microsoft.NETFrameworkv1.0.3705CONFIG, is an XML-formatted configuration file that specifies configuration options for the machine. This file contains, among many other XML elements, a browserCaps element. Inside this element are a number of other elements that specify parse rules for the various User-Agents, and what properties each of these parsings supports.

For example, to determine what platform is used, a filter element is used that specifies how to set the platform property based on what platform name is found in the User-Agent string. Specifically, the machine.config file contains:

platform=Win95
platform=Win98
platform=WinNT
...

That is, if in the User-Agent string the string "Windows 95" or "Win95" is found, the platform property is set to Win95. There are a number of filter elements in the browserCaps element in the machine.config file that define the various properties for various User-Agent strings.

Hence, when using the Request.Browser property to determine a user's browser features, the user's agent string is matched up to particular properties in the machine.config file. The ability for being able to detect a user's browser's capabilities, then, is based upon the honesty in the browser's sent User-Agent string. For example, Opera can be easily configured to send a User-Agent string that makes it appear as if it's IE 5.5. In this case from the Web server's perspective (and, hence, from your ASP.NET Web page's perspective), the user is visiting using IE 5.5, even though, in actuality, he is using Opera.

16. What is Web.config?
In classic ASP all Web site related information was stored in the metadata of IIS. This had the disadvantage that remote Web developers couldn't easily make Web-site configuration changes. For example, if you want to add a custom 404 error page, a setting needs to be made through the IIS admin tool, and you're Web host will likely charge you a flat fee to do this for you. With ASP.NET, however, these settings are moved into an XML-formatted text file (Web.config) that resides in the Web site's root directory. Through Web.config you can specify settings like custom 404 error pages, authentication and authorization settings for the Web sitempilation options for the ASP.NET Web pages, if tracing should be enabled, etc.

The Web.config file is an XML-formatted file. At the root level is the tag. Inside this tag you can add a number of other tags, the most common and useful one being the system.web tag, where you will specify most of the Web site configuration parameters. However, to specify application-wide settings you use the tag.
For example, if we wanted to add a database connection string parameter we could have a Web.config file like so.

17. What is the difference between ADO and ADO.NET?
ADO uses Recordsets and cursors to access and modify data. Because of its inherent design, Recordset can impact performance on the server side by tying up valuable resources. In addition, COM marshalling - an expensive data conversion process - is needed to transmit a Recordset. ADO.NET addresses three important needs that ADO doesn't address:
1. Providing a comprehensive disconnected data-access model, which is crucial to the Web environment
2. Providing tight integration with XML, and
3. Providing seamless integration with the .NET Framework (e.g., compatibility with the base class library's type system). From an ADO.NET implementation perspective, the Recordset object in ADO is eliminated in the .NET architecture. In its place, ADO.NET has several dedicated objects led by the DataSet object and including the DataAdapter, and DataReader objects to perform specific tasks. In addition, ADO.NET DataSets operate in disconnected state whereas the ADO RecordSet objects operated in a fully connected state.

In ADO, the in-memory representation of data is the recordset. In ADO.NET, it is the dataset. A recordset looks like a single table. If a recordset is to contain data from multiple database tables, it must use a JOIN query, which assembles the data from the various database tables into a single result table. In contrast, a dataset is a collection of one or more tables. The tables within a dataset are called data tables; specifically, they are DataTable objects. If a dataset contains data from multiple database tables, it will typically contain multiple DataTable objects. That is, each DataTable object typically corresponds to a single database table or view. In this way, a dataset can mimic the structure of the underlying database.
In ADO you scan sequentially through the rows of the recordset using the ADO MoveNext method. In ADO.NET, rows are represented as collections, so you can loop through a table as you would through any collection, or access particular rows via ordinal or primary key index. A cursor is a database element that controls record navigation, the ability to update data, and the visibility of changes made to the database by other users. ADO.NET does not have an inherent cursor object, but instead includes data classes that provide the functionality of a traditional cursor. For example, the functionality of a forward-only, read-only cursor is available in the ADO.NET DataReader object.
There is one significant difference between disconnected processing in ADO and ADO.NET. In ADO you communicate with the database by making calls to an OLE DB provider. In ADO.NET you communicate with the database through a data adapter (an OleDbDataAdapter, SqlDataAdapter, OdbcDataAdapter, or OracleDataAdapter object), which makes calls to an OLE DB provider or the APIs provided by the underlying data source.

17. What is the difference between VB and VB.NET?
Now VB.NET is object-oriented language. The following are some of the differences:
Data Type Changes
The .NET platform provides Common Type System to all the supported languages. This means that all the languages must support the same data types as enforced by common language runtime. This eliminates data type incompatibilities between various languages. For example on the 32-bit Windows platform, the integer data type takes 4 bytes in languages like C++ whereas in VB it takes 2 bytes. Following are the main changes related to data types in VB.NET:

. Under .NET the integer data type in VB.NET is also 4 bytes in size.
. VB.NET has no currency data type. Instead it provides decimal as a replacement.
. VB.NET introduces a new data type called Char. The char data type takes 2 bytes and can store Unicode characters.
. VB.NET do not have Variant data type. To achieve a result similar to variant type you can use Object data type. (Since every thing in .NET including primitive data types is an object, a variable of object type can point to any data type).
. In VB.NET there is no concept of fixed length strings.
. In VB6 we used the Type keyword to declare our user-defined structures. VB.NET introduces the structure keyword for the same purpose.
Declaring Variables
Consider this simple example in VB6:
Dim x,y as integer

In this example VB6 will consider x as variant and y as integer, which is somewhat odd behavior. VB.NET corrects this problem, creating both x and y as integers.
Furthermore, VB.NET allows you to assign initial values to the variables in the declaration statement itself:
br> Dim str1 as string = Hello

VB.NET also introduces Read-Only variables. Unlike constants Read-Only variables can be declared without initialization but once you assign a value to it, it cannot be changes.

Initialization here
Dim readonly x as integer
In later code
X=100
Now x can’t be changed
X=200 *********** Error **********
Property Syntax
In VB.NET, we anymore don't have separate declarations for Get and Set/Let. Now, everything is done in a single property declaration. This can be better explained by the following example.
Public [ReadOnly | WriteOnly] Property PropertyName as Datatype
Get
Return m_var
End Get
Set
M_var = value
End Set
End Property
Example:
Private _message as String
Public Property Message As String
Get
Return _message
End Get
Set
_message = Value
End Set
End Property

ByVal is the default - This is a crucial difference betwen VB 6.0 and VB.NET, where the default in VB 6.0 was by reference. But objects are still passed by reference.

Invoking Subroutines In previous versions of VB, only functions required the use of parentheses around the parameter list. But in VB.NET all function or subroutine calls require parentheses around the parameter list. This also applies, even though the parameter list is empty.

User-Defined Types - VB.NET does away with the keyword Type and replaces it with the keyword Structure
Public Structure Student
Dim strName as String
Dim strAge as Short
End Structure
Procedures and Functions

In VB6 all the procedure parameters are passed by reference (ByRef) by default. In VB.NET they are passed by value (ByVal) by default. Parantheses are required for calling procedures and functions whether they accept any parameters or not. In VB6 functions returned values using syntax like: FuntionName = return_value. In VB.NET you can use the Return keyword (Return return_value) to return values or you can continue to use the older syntax, which is still valid.

Scoping VB.NET now supports block-level scoping of variables. If your programs declare all of the variables at the beginning of the function or subroutine, this will not be a problem. However, the following VB 6.0 will cause an issue while upgrading to VB .NET

Do While objRs.Eof
Dim J as Integer
J=0
If objRs("flag")="Y" then
J=1
End If
objRs.MoveNext
Wend
If J Then
Msgbox "Flag is Y"
End If

In the above example the variable J will become out of scope just after the loop, since J was declared inside the While loop.

Exception Handling

The most wanted feature in earlier versions of VB was its error handling mechanism. The older versions relied on error handlers such as "On Error GoTo and On Error Resume Next. VB.NET provides us with a more stuructured approach. The new block structure allows us to track the exact error at the right time. The new error handling mechanism is refered to as Try...Throw...Catch...Finally. The following example will explain this new feature.

Sub myOpenFile()
Try
Open "myFile" For Output As #1
Write #1, myOutput
Catch
Kill "myFile"
Finally
Close #1
End try
End Sub

The keyword SET is gone - Since everything in VB.NET is an object. So the keyword SET is not at all used to differentiate between a simple variable assignment and an object assignment. So, if you have the following statement in VB 6.0

Set ObjConn = Nothing
Should be replaced as
ObjConn = Nothing.
Constructor and Destructor

The constructor procedure is one of the many new object-oriented features of VB.NET. The constructor in VB.NET replaces the Class_Initialize in VB 6.0. All occurance of Class_Initialize in previous versions of VB should now be placed in a class constructor. In VB.NET, a constructor is added to a class by adding a procedure called New. We can also create a class destructor, which is equivalent to Class_Terminate event in VB 6.0, by adding a sub-procedure called Finalize to our class. Usage of Return In VB.NET, we can use the keyword return to return a value from any function. In previous versions, we used to assign the value back with the help of the function name itself. The following example explains this:

Public Function Sum (intNum1 as Integer, intNum2 as Integer) as Integer
Dim intSum as Integer
intSum = intNum1 + intNum2
Return intSum
End Function
Static Methods

VB.NET now allows you to create static methods in your classes. Static methods are methods that can be called without requiring the developer to create instance of the class. For example, if you had a class named Foo with the non-static method NonStatic() and the static method Static(), you could call the Static() method like so:

Foo.Static()

However, non-static methods require than an instance of the class be created, like so:

Create an instance of the Foo class
Dim objFoo as New Foo()
Execute the NonStatic() method
ObjFoo.NonStatic()

To create a static method in a VB.NET, simply prefix the method definition with the keyword Shared.


Most Common HR Interview Questions


Tell me about yourself: - The most often asked question in interviews. You need to have a short statement prepared in your mind. Be careful that it does not sound rehearsed. Limit it to work-related items unless instructed otherwise. Talk about things you have done and jobs you have held that relate to the position you are interviewing for. Start with the item farthest back and work up to the present.

Why did you leave your last job? - Stay positive regardless of the circumstances. Never refer to a major problem with management and never speak ill of supervisors, co-workers or the organization. If you do, you will be the one looking bad. Keep smiling and talk about leaving for a positive reason such as an opportunity, a chance to do something special or other forward-looking reasons.

What experience do you have in this field? - Speak about specifics that relate to the position you are applying for. If you do not have specific experience, get as close as you can.

Do you consider yourself successful? - You should always answer yes and briefly explain why. A good explanation is that you have set goals, and you have met some and are on track to achieve the others.

What do co-workers say about you? - Be prepared with a quote or two from co-workers. Either a specific statement or a paraphrase will work. Jill Clark, a co-worker at Smith Company, always said I was the hardest workers she had ever known. It is as powerful as Jill having said it at the interview herself.

What do you know about this organization? - This question is one reason to do some research on the organization before the interview. Find out where they have been and where they are going. What are the current issues and who are the major players?
What have you done to improve your knowledge in the last year? - Try to include improvement activities that relate to the job. A wide variety of activities can be mentioned as positive self-improvement. Have some good ones handy to mention.

Are you applying for other jobs? - Be honest but do not spend a lot of time in this area. Keep the focus on this job and what you can do for this organization. Anything else is a distraction.

Why do you want to work for this organization? - This may take some thought and certainly, should be based on the research you have done on the organization. Sincerity is extremely important here and will easily be sensed. Relate it to your long-term career goals.

Do you know anyone who works for us? - Be aware of the policy on relatives working for the organization. This can affect your answer even though they asked about friends not relatives. Be careful to mention a friend only if they are well thought of.

What kind of salary do you need? - A loaded question. A nasty little game that you will probably lose if you answer first. So, do not answer it. Instead, say something like, That’s a tough question. Can you tell me the range for this position? In most cases, the interviewer, taken off guard, will tell you. If not, say that it can depend on the details of the job. Then give a wide range.

Are you a team player? - You are, of course, a team player. Be sure to have examples ready. Specifics that show you often perform for the good of the team rather than for yourself are good evidence of your team attitude. Do not brag, just say it in a matter-of-fact tone. This is a key point.

How long would you expect to work for us if hired? - Specifics here are not good. Something like this should work: I’d like it to be a long time. Or As long as we both feel I’m doing a good job.

Have you ever had to fire anyone? How did you feel about that? - This is serious. Do not make light of it or in any way seem like you like to fire people. At the same time, you will do it when it is the right thing to do. When it comes to the organization versus the individual who has created a harmful situation, you will protect the organization. Remember firing is not the same as layoff or reduction in force.

What is your philosophy towards work? - The interviewer is not looking for a long or flowery dissertation here. Do you have strong feelings that the job gets done? Yes. That’s the type of answer that works best here. Short and positive, showing a benefit to the organization.

If you had enough money to retire right now, would you? - Answer yes if you would. But since you need to work, this is the type of work you prefer. Do not say yes if you do not mean it.

Have you ever been asked to leave a position? - If you have not, say no. If you have, be honest, brief and avoid saying negative things about the people or organization involved.

Explain how you would be an asset to this organization - You should be anxious for this question. It gives you a chance to highlight your best points as they relate to the position being discussed. Give a little advance thought to this relationship.

Why should we hire you? - Point out how your assets meet what the organization needs. Do not mention any other candidates to make a comparison.

Tell me about a suggestion you have made - Have a good one ready. Be sure and use a suggestion that was accepted and was then considered successful. One related to the type of work applied for is a real plus.

What irritates you about co-workers? - This is a trap question. Think real hard but fail to come up with anything that irritates you. A short statement that you seem to get along with folks is great.

What is your greatest strength? - Numerous answers are good, just stay positive. A few good examples: Your ability to prioritize, Your problem-solving skills, Your ability to work under pressure, Your ability to focus on projects, Your professional expertise, Your leadership skills, Your positive attitude .

Tell me about your dream job. - Stay away from a specific job. You cannot win. If you say the job you are contending for is it, you strain credibility. If you say another job is it, you plant the suspicion that you will be dissatisfied with this position if hired. The best is to stay genetic and say something like: A job where I love the work, like the people, can contribute and can’t wait to get to work.

Why do you think you would do well at this job? - Give several reasons and include skills, experience and interest.

What kind of person would you refuse to work with? - Do not be trivial. It would take disloyalty to the organization, violence or lawbreaking to get you to object. Minor objections will label you as a whiner.

What is more important to you: the money or the work? - Money is always important, but the work is the most important. There is no better answer.

What would your previous supervisor say your strongest point is? - There are numerous good possibilities: Loyalty, Energy, Positive attitude, Leadership, Team player, Expertise, Initiative, Patience, Hard work, Creativity, Problem solver.

Tell me about a problem you had with a supervisor - Biggest trap of all. This is a test to see if you will speak ill of your boss. If you fall for it and tell about a problem with a former boss, you may well below the interview right there. Stay positive and develop a poor memory about any trouble with a supervisor.
What has disappointed you about a job? - Don’t get trivial or negative. Safe areas are few but can include: Not enough of a challenge. You were laid off in a reduction Company did not win a contract, which would have given you more responsibility.

Tell me about your ability to work under pressure. - You may say that you thrive under certain types of pressure. Give an example that relates to the type of position applied for.
Do your skills match this job or another job more closely? - Probably this one. Do not give fuel to the suspicion that you may want another job more than this one.

What motivates you to do your best on the job? - This is a personal trait that only you can say, but good examples are: Challenge, Achievement, Recognition
Are you willing to work overtime? Nights? Weekends? - This is up to you. Be totally honest.
How would you know you were successful on this job? - Several ways are good measures: You set high standards for yourself and meet them. Your outcomes are a success.Your boss tell you that you are successful
Would you be willing to relocate if required? - You should be clear on this with your family prior to the interview if you think there is a chance it may come up. Do not say yes just to get the job if the real answer is no. This can create a lot of problems later on in your career. Be honest at this point and save yourself future grief.
Are you willing to put the interests of the organization ahead of your own? - This is a straight loyalty and dedication question. Do not worry about the deep ethical and philosophical implications. Just say yes.
Describe your management style. - Try to avoid labels. Some of the more common labels, like progressive, salesman or consensus, can have several meanings or descriptions depending on which management expert you listen to. The situational style is safe, because it says you will manage according to the situation, instead of one size fits all.
What have you learned from mistakes on the job? - Here you have to come up with something or you strain credibility. Make it small, well intentioned mistake with a positive lesson learned. An example would be working too far ahead of colleagues on a project and thus throwing coordination off.
Do you have any blind spots? - Trick question. If you know about blind spots, they are no longer blind spots. Do not reveal any personal areas of concern here. Let them do their own discovery on your bad points. Do not hand it to them.
If you were hiring a person for this job, what would you look for? - Be careful to mention traits that are needed and that you have.
Do you think you are overqualified for this position? - Regardless of your qualifications, state that you are very well qualified for the position.
How do you propose to compensate for your lack of experience? - First, if you have experience that the interviewer does not know about, bring that up: Then, point out (if true) that you are a hard working quick learner.
What qualities do you look for in a boss? - Be generic and positive. Safe qualities are knowledgeable, a sense of humor, fair, loyal to subordinates and holder of high standards. All bosses think they have these traits.
Tell me about a time when you helped resolve a dispute between others. - Pick a specific incident. Concentrate on your problem solving technique and not the dispute you settled.
What position do you prefer on a team working on a project? - Be honest. If you are comfortable in different roles, point that out.
Describe your work ethic. - Emphasize benefits to the organization. Things like, determination to get the job done and work hard but enjoy your work are good.
What has been your biggest professional disappointment? - Be sure that you refer to something that was beyond your control. Show acceptance and no negative feelings.
Tell me about the most fun you have had on the job. - Talk about having fun by accomplishing something for the organization.
Do you have any questions for me? - Always have some questions prepared. Questions prepared where you will be an asset to the organization are good. How soon will I be able to be productive? and What type of projects will I be able to assist on? are examples.

Wednesday 3 October 2012

Software Engineering Interview Question and Answers



1.    Define software engineering?
    
According to IEEE, Software engineering is the application of a systematic, disciplined, quantifiable approach to the development, operation and maintenance of sofware.
2.    What are the categories of software?
    
System software
Application software
Embedded software
Web Applications
Artificial Intelligence software
Scientific software.
3.    Define testing?
    
Testing is a process of executing a program with the intent of finding of an error.
4.    What is white box testing?
    
White box testing is a test case design method that uses the control structure of the procedural design to derive test cases. It is otherwise called as structural testing.
5.    What is Black box testing?
    
Black box testing is a test case design method that focuses on the functional requirements of the software. It is otherwise called as functional testing.

6.    What is verification and validation?
    
Verification refers to the set of activities that ensure that software correctly implements a specific function.

Validation refers to the set of activities that ensure that the software that has been built is traceable to customer requirements.
7.    What is debugging?
    
Debugging is the process that results in the removal of error. It occurs as a consequence of successful testing.
8.    Define cyclomatic complexity?
    
Cyclomatic complexity is a software metric that provides a quantitative measuer of the logical complexity of a program.
9.    What is error tracking?
    
Error tracking is an activity that provides a means for assessing the status of a current project.
10.    What are case tools?
    
Computer Aided Software Engineering - CASE tools assist software engineering managers and practitioners in evey activity associated with the software process. They automate project management activities manage all work products produced throughout the process and assist the engineers in their analysis, design, coding and test work.

11.    What is data design?
    
Data design transforms the information domain model created during analysis into the data structures that will be required to implement the software.
12.    Define cohension and coupling?
    
Cohension is a measure of the relative functional strength of a module.

Coupling is a measure of the relative interdependence among modules.
13.    What are the different types of cohension?
    
There are different types of cohension are
Coincidental cohension
Logical cohension
Temporal cohension
Procedural cohension
Communicational cohension
14.    What are the different types of coupling?
    
There are different types of coupling are
Data coupling
Stamp coupling
Control coupling
External coupling
Common coupling
Content coupling
15.    What is user interface design?
    
User interface design creates an effective communication medium between a human and a computer.

16.    What is meant by specification?
    
A specification can be a written document, a graphical model, a formal mathematical model, a collection of usage scenarios, a prototype or any combination of these.
17.    Define process?
    
A series of steps involving activities, constraints, and resources that produce an intended output of some kind is known as process.
18.    How spiral model works?
    
The spiral model is an evolutionary software process model that couples the iterative nature of prototyping with the controlled and systematic aspects of the waterfall lifecycle model. It also has an emphasis on the use of risk management techniques.
19.    What is winwin spiral model?
    
Winwin spiral model defines a set of negotiation activities at the beginning of each pass around the spiral. The best negotiations strive for a win-win result.
20.    Mention the various views in system engineering hierarchy?
    
The various views in system engineering hierarchy from top to bottom in order are
World view
Domain view
Element view
Detailed view

21.    What is software requirements definition?
    
A software requirements definition is an abstract description of the services which the system should provide and the constraints under which the system must operate.


UNIX Commands Interview Questions And Answers



1. Construct pipes to execute the following jobs.
1. Output of who should be displayed on the screen with value of total number of users who have logged in displayed at the bottom of the list.

2. Output of ls should be displayed on the screen and from this output the lines containing the word ‘poem’ should be counted and the count should be stored in a file.

3. Contents of file1 and file2 should be displayed on the screen and this output should be appended in a file. From output of ls the lines containing ‘poem’ should be displayed on the screen along with the count.

4. Name of cities should be accepted from the keyboard . This list should be combined with the list present in a file. This combined list should be sorted and the sorted list
should be stored in a file ‘newcity’.

5. All files present in a directory dir1 should be deleted any error while deleting should be stored in a file ‘errorlog’.

2. Explain the following commands.
$ ls > file1
$ banner hi-fi > message
$ cat par.3 par.4 par.5 >> report
$ cat file1>file1
$ date ; who
$ date ; who > logfile
$ (date ; who) > logfile

3. What is the significance of the “tee” command?
It reads the standard input and sends it to the standard output while redirecting a copy of what it has read to the file specified by the user.

4. What does the command “ $who | sort –logfile > newfile” do?
The input from a pipe can be combined with the input from a file . The trick is to use the special symbol “-“ (a hyphen) for those commands that recognize the hyphen as std input.
In the above command the output from who becomes the std input to sort , meanwhile sort opens the file logfile, the contents of this file is sorted together with the output of who (rep by the hyphen) and the sorted output is redirected to the file newfile.

5. What does the command “$ls | wc –l > file1” do?
ls becomes the input to wc which counts the number of lines it receives as input and instead of displaying this count , the value is stored in file1.

6. Which of the following commands is not a filter man , (b) cat , (c) pg , (d) head
Ans: man
A filter is a program which can receive a flow of data from std input, process (or filter) it and send the result to the std output.

7. How is the command “$cat file2 “ different from “$cat >file2 and >> redirection operators ?
is the output redirection operator when used it overwrites while >> operator appends into the file.

9. Explain the steps that a shell follows while processing a command.
After the command line is terminated by the key, the shel goes ahead with processing the command line in one or more passes. The sequence is well defined and assumes the following order.
Parsing: The shell first breaks up the command line into words, using spaces and the delimiters, unless quoted. All consecutive occurrences of a space or tab are replaced here with a single space.
Variable evaluation: All words preceded by a $ are avaluated as variables, unless quoted or escaped.
Command substitution: Any command surrounded by backquotes is executed by the shell which t hen replaces the standard output of the command into the command line.
Wild-card interpretation: The shell finally scans the command line for wild-cards (the characters *, ?, [, ]).
Any word containing a wild-card is replaced by a sorted list of filenames that match the pattern. The list of these filenames then forms the arguments to the command.
PATH evaluation: It finally looks for the PATH variable to determine the sequence of directories it has to search in order to hunt for the command.

10. What difference between cmp and diff commands?
cmp - Compares two files byte by byte and displays the first mismatch
diff - tells the changes to be made to make the files identical

11. What is the use of ‘grep’ command?
‘grep’ is a pattern search command. It searches for the pattern, specified in the command line with appropriate option, in a file(s).
Syntax : grep
Example : grep 99mx mcafile

12. What is the difference between cat and more command?
Cat displays file contents. If the file is large the contents scroll off the screen before we view it. So
command 'more' is like a pager which displays the contents page by page.

13. Write a command to kill the last background job?
Kill $!

14. Which command is used to delete all files in the current directory and all its sub-directories?
rm -r *

15. Write a command to display a file’s contents in various formats?
$od -cbd file_name
c - character, b - binary (octal), d-decimal, od=Octal Dump.

16. What will the following command do?
$ echo *
It is similar to 'ls' command and displays all the files in the current directory.

17. Is it possible to create new a file system in UNIX?
Yes, ‘mkfs’ is used to create a new file system.
18. Is it possible to restrict incoming message?
Yes, using the ‘mesg’ command.

19. What is the use of the command "ls -x chapter[1-5]"
ls stands for list; so it displays the list of the files that starts with 'chapter' with suffix '1' to '5', chapter1,
chapter2, and so on.

20. Is ‘du’ a command? If so, what is its use?
Yes, it stands for ‘disk usage’. With the help of this command you can find the disk capacity and free space of the disk.

21. Is it possible to count number char, line in a file; if so, How?
Yes, wc-stands for word count.
wc -c for counting number of characters in a file.
wc -l for counting lines in a file.

22. Name the data structure used to maintain file identification?
‘inode’, each file has a separate inode and a unique inode number.

23. How many prompts are available in a UNIX system?
Two prompts, PS1 (Primary Prompt), PS2 (Secondary Prompt).

24. How does the kernel differentiate device files and ordinary files?

Kernel checks 'type' field in the file's inode structure.

25. How to switch to a super user status to gain privileges?
Use ‘su’ command. The system asks for password and when valid entry is made the user gains super user (admin) privileges.

26. What are shell variables?
Shell variables are special variables, a name-value pair created and maintained by the shell.
Example: PATH, HOME, MAIL and TERM

27. What is redirection?
Directing the flow of data to the file or from the file for input or output.
Example : ls > wc

28. How to terminate a process which is running and the specialty on command kill 0?
With the help of kill command we can terminate the process.
Syntax: kill pid
Kill 0 - kills all processes in your system except the login shell.

29. What is a pipe and give an example?
A pipe is two or more commands separated by pipe char '|'. That tells the shell to arrange for the output of the preceding command to be passed as input to the following command.
Example : ls -l | pr
The output for a command ls is the standard input of pr. When a sequence of commands are combined using pipe, then it is called pipeline.

30. Explain kill() and its possible return values.
There are four possible results from this call:
‘kill()’ returns 0. This implies that a process exists with the given PID, and the system would allow you to send signals to it. It is system-dependent whether the process could be a zombie.
‘kill()’ returns -1, ‘errno == ESRCH’ either no process exists with the given PID, or security enhancements are causing the system to deny its existence. (On some systems, the process could be a zombie.) ‘kill()’ returns -1, ‘errno == EPERM’ the system would not allow you to kill the specified process. This means that either the process exists (again, it could be a zombie) or draconian security enhancements are present (e.g. your process is not allowed to send signals to *anybody*). ‘kill()’ returns -1, with some other value of ‘errno’ you are in trouble! The most-used technique is to assume that success or failure with ‘EPERM’ implies that the process exists, and any other error implies that it doesn't.
An alternative exists, if you are writing specifically for a system (or all those systems) that provide a ‘/proc’ filesystem: checking for the existence of ‘/proc/PID’ may work.

Networking Interview Questions


Network engineer interview questions
OSPF
Describe OSPF in your own words.
OSPF areas, the purpose of having each of them
Types of OSPF LSA, the purpose of each LSA type
What exact LSA type you can see in different areas
How OSPF establishes neighboor relation, what the stages are
If OSPF router is stucked in each stage what the problem is and how to troubleshoot it
OSPF hierarchy in the single or multi areas. Cool OSPF behavior in broadcast and nonbroadcast
Draw the diagram of typical OSPF network and explain generally how it works, DR, BDR, election, ASBR, ABR, route redistribution and summarization
STP
How it works and the purpose
Diff types (SSTP, MSTP, RSTP) Cisco - PVST/PVST+
root election
Diff. port stages and timing for convergence
Draw the typical diagram and explain how diff types of STP work
What ports are blocking or forwarding
How it works if there are topology changes
ACLs
What are they
Diff types
Write an example if you want to allow and to deny…
Well-known port numbers (DNS - 53 and etc…)
QOS
What is that
What is the diff b/w L2 and L3 QoS
How it works
Network:
Draw the typical network diagram you have to deal with
explain how it works
What part of it you are responsible
firewall, what is that, how it works, how it is diff from ACLs
What problems with the network you had had and how you solved it.
What are the ways to troubleshoot the network, techniques, commands
network security, ways to achieve it
Switching:
VLANs
STP
How a L2 switch works with broadcast, unicast, multicast, known/unknown traffic
VRRP, GLBP
port monitoring and mirroring
L3 switch, how it works
PIM sparse and dense modes

^Back to Top

Windows admin interview questions
Describe how the DHCP lease is obtained. It’s a four-step process consisting of (a) IP request, (b) IP offer, © IP selection and (d) acknowledgement.
I can’t seem to access the Internet, don’t have any access to the corporate network and on ipconfig my address is 169.254.*.*. What happened? The 169.254.*.* netmask is assigned to Windows machines running 98/2000/XP if the DHCP server is not available. The name for the technology is APIPA (Automatic Private Internet Protocol Addressing).
We’ve installed a new Windows-based DHCP server, however, the users do not seem to be getting DHCP leases off of it. The server must be authorized first with the Active Directory.
How can you force the client to give up the dhcp lease if you have access to the client PC? ipconfig /release
What authentication options do Windows 2000 Servers have for remote clients? PAP, SPAP, CHAP, MS-CHAP and EAP.
What are the networking protocol options for the Windows clients if for some reason you do not want to use TCP/IP? NWLink (Novell), NetBEUI, AppleTalk (Apple).
What is data link layer in the OSI reference model responsible for? Data link layer is located above the physical layer, but below the network layer. Taking raw data bits and packaging them into frames. The network layer will be responsible for addressing the frames, while the physical layer is reponsible for retrieving and sending raw data bits.
What is binding order? The order by which the network protocols are used for client-server communications. The most frequently used protocols should be at the top.
How do cryptography-based keys ensure the validity of data transferred across the network? Each IP packet is assigned a checksum, so if the checksums do not match on both receiving and transmitting ends, the data was modified or corrupted.
Should we deploy IPSEC-based security or certificate-based security? They are really two different technologies. IPSec secures the TCP/IP communication and protects the integrity of the packets. Certificate-based security ensures the validity of authenticated clients and servers.
What is LMHOSTS file? It’s a file stored on a host machine that is used to resolve NetBIOS to specific IP addresses.
What’s the difference between forward lookup and reverse lookup in DNS? Forward lookup is name-to-address, the reverse lookup is address-to-name.
How can you recover a file encrypted using EFS? Use the domain recovery agent.

^Back to Top

Network engineer/architect interview questions
Explain how traceroute, ping, and tcpdump work and what they are used for?
Describe a case where you have used these tools to troubleshoot.
What is the last major networking problem you troubleshot and solved on your own in the last year?
What LAN analyzer tools are you familiar with and describe how you use them to troubleshoot and on what media and network types.
Explain the contents of a routing table (default route, next hop, etc.)
What routing protocols have you configured?
Describe the commands to set up a route.
What routing problems have you troubleshot?
How do you display a routing table on a Cisco? On a host?
How do you use a routing table and for what?
What is a route flap?
What is a metric?
When do you use BGP, IGRP, OSPF, Static Routes?
What do you see as current networking security issues (e.g. NFS mounting, spoofing, one time passwords, etc.)?
Describe a routing filter and what it does.
Describe an access list and what it does.
What is a network management system?
Describe how SNMP works.
Describe the working environment you are currently in, e.g. frequent interruptions, frequent priority shifting, team or individual.
What do you use to write documentation? Editor? Mail reader?
What platform (s) do you currently work on at your desk?
How do you manage multiple concurrent high level projects?
Describe a recent short term stressful situation and how you managed it.
How do you manage a long term demanding stressful work environment?
Have you worked in an assignment based environment, e.g. work request/trouble ticket system, and if so, describe that environment.
Describe what network statistics or measurement tools you are familiar with and how you have used them.
Describe what a VPN is and how it works.
Describe how VoIP works.
Describe methods of QoS.
How does ToS bit work?

^Back to Top

CCNA/Cisco admin interview questions
You need to retrieve a file from the file server for your word processing application, which layer of the OSI model is responsible for this function?
Presentation layer
Application layer
Session layer
Transport layer
Datalink layer
You are working in a word processing program, which is run from the file server. Your data comes back to you in an unintelligible manner. Which layer of the OSI model would you investigate?
Application layer
Presentation layer
Session layer
Network layer
Datalink layer
The IEEE subdivided the datalink layer to provide for environments that need connectionless or connection-oriented services. What are the two layers called?
Physical
MAC
LLC
Session
IP
You are working with graphic translations. Which layer of the OSI model is responsible for code formatting and conversion and graphic standards.
Network layer
Session layer
Transport layer
Presentation layer
Which is the best definition of encapsulation?
Each layer of the OSI model uses encryption to put the PDU from the upper layer into its data field. It adds header and trailer information that is available to its counterpart on the system that will receive it.
Data always needs to be tunneled to its destination so encapsulation must be used.
Each layer of the OSI model uses compression to put the PDU from the upper layer into its data field. It adds header and trailer information that is available to its counterpart on the system that will receive it.
Each layer of the OSI model uses encapsulation to put the PDU from the upper layer into its data field. It adds header and trailer information that is available to its counterpart on the system that will receive it.
Routers can be configured using several sources. Select which of the following sources can be used.
Console Port
Virtual Terminals
TFTP Server
Floppy disk
Removable media
Which memory component on a Cisco router contains the dynamic system configuration?
ROM
NVRAM
Flash
RAM/DRAM
Which combination of keys will allow you to view the previous commands that you typed at the router?
ESC-P
Ctrl-P
Shift-P
Alt-P
Which commands will display the active configuration parameters?
show running-config
write term
show version
display term
You are configuring a router, which prompt tells you that you are in the privileged EXEC mode?
@
>
!
:
#
What does the command “IP name-server 255.255.255.255? accomplish?
It disables domain name lookup.
It sets the domain name lookup to be a local broadcast.
This is an illegal command.
The command is now defunct and has been replaced by “IP server-name ip any”
The following selections show the command prompt and the configuration of the IP network mask. Which two are correct?
Router(config-if)#netmask-format { bitcount | decimal | hexadecimal }
Router#term IP netmask-format { bitcount | decimal | hexadecimal }
Router(config-if)#IP netmask-format { bitcount | decimal | hexadecimal }
Router#ip netmask-format { bitcount | decimal | hexadecimal }
Which layer is responsible for flow control with sliding windows and reliability with sequence numbers and acknowledgments?
Transport
Application
Internet
Network Interface
Which processes does TCP, but not UDP, use?
Windowing
Acknowledgements
Source Port
Destination Port
Select which protocols use distance vector routing?
OSPF
RIP
IGRP
PPP

^Back to Top

Networking and Unix interview questions
What is UTP?

UTP — Unshielded twisted pair 10BASE-T is the preferred Ethernet medium of the 90s. It is based on a star topology and provides a number of advantages over coaxial media:

It uses inexpensive, readily available copper phone wire. UTP wire is much easier to install and debug than coax. UTP uses RG-45 connectors, which are cheap and reliable.


What is a router? What is a gateway?

Routers are machines that direct a packet through the maze of networks that stand between its source and destination. Normally a router is used for internal networks while a gateway acts a door for the packet to reach the ‘outside’ of the internal network


What is Semaphore? What is deadlock?

Semaphore is a synchronization tool to solve critical-section problem, can be used to control access to the critical section for a process or thread. The main disadvantage (same of mutual-exclusion) is require busy waiting. It will create problems in a multiprogramming system, where a single CPU is shared among many processes.

Busy waiting wastes CPU cycles.


Deadlock is a situation when two or more processes are waiting indefinitely for an event that can be caused by only one of the waiting processes. The implementation of a semaphore with a waiting queue may result in this situation.


What is Virtual Memory?

Virtual memory is a technique that allows the execution of processes that may not be completely in memory. A separation of user logical memory from physical memory allows an extremely large virtual memory to be provided for programmers when only a smaller physical memory is available. It is commonly implemented by demand paging. A demand paging system is similar to a paging system with swapping. Processes reside on secondary memory (which is usually a disk). When we want to execute a process, we swap it into memory.


Explain the layered aspect of a UNIX system. What are the layers? What does it mean to say they are layers?


A UNIX system has essentially three main layers:

. The hardware

. The operating system kernel

. The user-level programs


The kernel hides the system’s hardware underneath an abstract, high-level programming interface. It is responsible for implementing many of the facilities that users and user-level programs take for granted.


The kernel assembles all of the following UNIX concepts from lower-level hardware features:

. Processes (time-sharing, protected address space)

. Signals and semaphores

. Virtual Memory (swapping, paging, and mapping)

. The filesystem (files, directories, namespace)

. Pipes and network connections (inter-process communication)

HR Interview Questions and Answers


What Are Your Strenght and Weaknesses?
"My strength is my flexibility to handle change. As far as weaknesses, I feel that my management skills could be stronger, and I am constantly working to improve them."

Why Should We Hire You?
"I have a unique combination of strong technical skills, and the ability to build strong customer relationships. This allows me to use my knowledge and break down information to be more user-friendly." "With five years' experience working in the financial industry and my proven record of saving the company money, I could make a big difference in your company. I'm confident I would be a great addition to your team."
Why Do You Want to Work Here?
This is the company I've been looking for, a place where my background, experience and skills can be put to use and make things happen."
or
"I've selected key companies whose mission statements are in line with my values, and this company is very high on my list of desirable choices."
WHAT is ur goal
"My immediate goal is to get a job in a growth-oriented company. My long-term goal will depend on where the company goes. I hope to eventually grow into a position of responsibility."

If you are employed, focus on what you want in your next job: "After two years, I made the decision to look for a company that is team-focused, where I can add my experience."
When Were You Most Satisfied in Your Job?
"I was very satisfied in my last job, because I worked directly with the customers and their problems; that is an important part of the job for me."
What Are Three Positive Things Your Last Boss Would Say About You?
It's time to pull out your old performance appraisals and boss's quotes. This is a great way to brag about yourself through someone else's words: "My boss has told me that I am the best designer he has ever had. He knows he can rely on me, and he likes my sense of humor


I have been in the customer service industry for the past five years. My most recent experience has been handling incoming calls in the high tech industry. One reason I particularly enjoy this business, and the challenges that go along with it, is the opportunity to connect with people. In my last job,."
Next, mention your strengths and abilities:
"My real strength is my attention to detail. I pride myself on my reputation for following through and meeting deadlines. When I commit to doing something, I make sure it gets done, and on time."
Continued...
Conclude with a statement about your current situation:
"What I am looking for now is a company that values customer relations, where I can join a strong team and have a positive impact on customer retention and sales."

computer networks interview questions


1. What are 10Base2, 10Base5 and 10BaseT Ethernet LANs
10Base2—An Ethernet term meaning a maximum transfer rate of 10 Megabits per second that uses baseband signaling, with a contiguous cable segment length of 100
meters and a maximum of 2 segments.
10Base5—An Ethernet term meaning a maximum transfer rate of 10 Megabits per second that uses baseband signaling, with 5 continuous segments not exceeding 100
meters per segment.
10BaseT—An Ethernet term meaning a maximum transfer rate of 10 Megabits per second that uses baseband signaling and twisted pair cabling.

2. What is the difference between an unspecified passive open and a fully specified passive open
An unspecified passive open has the server waiting for a connection request from a client. A fully specified passive open has the server waiting for a connection from a
specific client.

3. Explain the function of Transmission Control Block
A TCB is a complex data structure that contains a considerable amount of information about each connection.

4. 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.

5. What is anonymous FTP and why would you use it
Anonymous FTP enables users to connect to a host without using a valid login and password. Usually, anonymous FTP uses a login called anonymous or guest, with the
password usually requesting the user's ID for tracking purposes only. Anonymous FTP is used to enable a large number of users to access files on the host without having
to go to the trouble of setting up logins for them all. Anonymous FTP systems usually have strict controls over the areas an anonymous user can access.

6. What is a pseudo tty A pseudo tty or false terminal enables external machines to connect through Telnet or rlogin. Without a pseudo tty, no connection can take place.

7. What is REX
What advantage does REX offer other similar utilities

8. 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.

9. What is External Data Representation
External Data Representation is a method of encoding data within an RPC message, used to ensure that the data is not system-dependent.

10. What is the Network Time Protocol ?

11. BOOTP helps a diskless workstation boot. How does it get a message to the network looking
for its IP address and the location of its operating system boot files BOOTP sends a UDP message with a subnetwork broadcast address and waits for a reply from a server that gives it the IP address. The same message might contain the name of the machine that has the boot files on it. If the boot image location is not specified, the workstation sends another UDP message to query the server.

12. 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.

13. 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.
14. What is the difference between interior and exterior neighbor gateways
Interior gateways connect LANs of one organization, whereas exterior gateways connect the organization to the outside world.

15. What is the HELLO protocol used for
The HELLO protocol uses time instead of distance to determine optimal routing. It is an alternative to the Routing
Information Protocol.

16. What are the advantages and disadvantages of the three types of routing tables
The three types of routing tables are fixed, dynamic, and fixed central. The fixed table must be manually modified every time there is a change. A dynamic table changes its
information based on network traffic, reducing the amount of manual maintenance. A fixed central table lets a manager modify only one table, which is then read by other
devices. The fixed central table reduces the need to update each machine's table, as with the fixed table. Usually a dynamic table causes the fewest problems for a network
administrator, although the table's contents can change without the administrator being aware of the change.

17. What is a TCP connection table
18. What is source route
It is a sequence of IP addresses identifying the route a datagram must follow. A source route may optionally be included in an IP datagram header.

19. What is RIP (Routing Information Protocol)
It is a simple protocol used to exchange information between the routers.

20. What is SLIP (Serial Line Interface Protocol)
It is a very simple protocol used for transmission of IP datagrams across a serial line.

21. What is Proxy ARP
It is using a router to answer ARP requests. This will be done when the originating host believes that a destination is local, when in fact is lies beyond router.
22. What is OSPF
It is an Internet routing protocol that scales well, can route traffic along multiple paths, and uses knowledge of an Internet's topology to make accurate routing decisions.

23. What is Kerberos
It is an authentication service developed at the Massachusetts Institute of Technology. Kerberos uses encryption to prevent intruders from discovering passwords and gaining unauthorized access to files.
24. What is a Multi-homed Host
It is a host that has a multiple network interfaces and that requires m ultiple IP addresses is called as a Multi-homed Host.

25. What is NVT (Network Virtual Terminal)
It is a set of rules defining a very simple virtual terminal interaction. The NVT is used in the start of a Telnet session.
26. What is Gateway-to-Gateway protocol
It is a protocol formerly used to exchange routing information between Internet core routers.

27. What is BGP (Border Gateway Protocol)
It is a protocol used to advertise the set of networks that can be reached with in an autonomous system. BGP enables this information to be shared with the autonomous
system. This is newer than EGP (Exterior Gateway Protocol).

28. What is autonomous system
It is a collection of routers under the control of a single administrative authority and that uses a common Interior Gateway Protocol.

29. What is EGP (Exterior Gateway Protocol)
It is the protocol the routers in neighboring autonomous systems use to identify the set of networks that can be reached
within or via each autonomous system.
Computer Networks Interview Questions
30. What is IGP (Interior Gateway Protocol)
It is any routing protocol used within an autonomous system.
31. What is Mail Gateway
It is a system that performs a protocol translation between different electronic mail delivery protocols.
32. What is wide-mouth frog
Wide-mouth frog is the simplest known key distribution center (KDC) authentication protocol.
33. What are Digrams and Trigrams
The most common two letter combinations are called as digrams. e.g. th, in, er, re and an. The most common three letter combinations are called as trigrams. e.g. the, ing,
and, and ion.
34. What is silly window syndrome
It is a problem that can ruin TCP performance. This problem occurs when data are passed to the sending TCP entity in large blocks, but an interactive application on the
receiving side reads 1 byte at a time.
35. What is region
When hierarchical routing is used, the routers are divided into what we call regions, with each router knowing all the details about how to route packets to destinations
within its own region, but knowing nothing about the internal structure of other regions.
36. What is multicast routing
Sending a message to a group is called multicasting, and its routing algorithm is called multicast routing.
37. What is traffic shaping
One of the main causes of congestion is that traffic is often busy. If hosts could be made to transmit at a uniform rate,
congestion would be less common. Another open loop
method to help manage congestion is forcing the packet to be transmitted at a more predictable rate. This is called
traffic shaping.
38. What is packet filter
Packet filter is a standard router equipped with some extra functionality. The extra functionality allows every incoming or
outgoing packet to be inspected. Packets meeting
some criterion are forwarded normally. Those that fail the test are dropped.
39. What is virtual path
Along any transmission path from a given source to a given destination, a group of virtual circuits can be grouped
together into what is called path.
Computer Networks Interview Questions
40. What is virtual channel
Virtual channel is normally a connection from one source to one destination, although multicast connections are also
permitted. The other name for virtual channel is virtual
circuit.
41. What is logical link control
One of two sublayers of the data link layer of OSI reference model, as defined by the IEEE 802 standard. This sublayer
is responsible for maintaining the link between
computers when they are sending data across the physical network connection.
42. Why should you care about the OSI Reference Model
It provides a framework for discussing network operations and design.
43. What is the difference between routable and non- routable protocols
Routable protocols can work with a router and can be used to build large networks. Non-Routable protocols are
designed to work on small, local networks and cannot be
used with a router
44. What is MAU
In token Ring , hub is called Multistation Access Unit(MAU).
45. Explain 5-4-3 rule
In a Ethernet network, between any two points on the network, there can be no more than five network segments or four
repeaters, and of those five segments only three of
segments can be populated.
46. What is the difference between TFTP and FTP application layer protocols
The Trivial File Transfer Protocol (TFTP) allows a local host to obtain files from a remote host but does not provide
reliability or security. It uses the fundamental packet
delivery services offered by UDP.
The File Transfer Protocol (FTP) is the standard mechanism provided by TCP / IP for copying a file from one host to
another. It uses the services offered by TCP and so is
reliable and secure. It establishes two connections (virtual circuits) between the hosts, one for data transfer and another
for control information.
47. What is the range of addresses in the classes of internet addresses
Class A 0.0.0.0 - 127.255.255.255
Class B 128.0.0.0 - 191.255.255.255
Class C 192.0.0.0 - 223.255.255.255
Class D 224.0.0.0 - 239.255.255.255
Class E 240.0.0.0 - 247.255.255.255
48. What is the minimum and maximum length of the header in the TCP segment and IP datagram
The header should have a minimum length of 20 bytes and can have a maximum length of 60 bytes.
Computer Networks Interview Questions
49. What is difference between ARP and RARP
The address resolution protocol (ARP) is used to associate the 32 bit IP address with the 48 bit physical address, used
by a host or a router to find the physical address of
another host on its network by sending a ARP query packet that includes the IP address of the receiver.
The reverse address resolution protocol (RARP) allows a host to discover its Internet address when it knows only its
physical address.
50. What is ICMP
ICMP is Internet Control Message Protocol, a network layer protocol of the TCP/IP suite used by hosts and gateways to
send notification of datagram problems back to the
sender. It uses the echo test / reply to test whether a destination is reachable and responding. It also handles both
control and error messages.
51. What are the data units at different layers of the TCP / IP protocol suite
The data unit created at the application layer is called a message, at the transport layer the data unit created is called
either a segment or an user datagram, at the network
layer the data unit created is called the datagram, at the data link layer the datagram is encapsulated in to a frame and
finally transmitted as signals along the transmission
media.
52. What is Project 802
It is a project started by IEEE to set standards that enable intercommunication between equipment from a variety of
manufacturers. It is a way for specifying functions of the
physical layer, the data link layer and to some extent the network layer to allow for interconnectivity of major LAN
protocols.
It consists of the following:
802.1 is an internetworking standard for compatibility of different LANs and MANs across protocols.
802.2 Logical link control (LLC) is the upper sublayer of the data link layer which is non-architecture-specific, that is
remains the same for all IEEE-defined LANs.
Media access control (MAC) is the lower sublayer of the data link layer that contains some distinct modules each
carrying proprietary information specific to the LAN product
being used. The modules are Ethernet LAN (802.3), Token ring LAN (802.4), Token bus LAN (802.5).
802.6 is distributed queue dual bus (DQDB) designed to be used in MANs.
53. What is Bandwidth
Every line has an upper limit and a lower limit on the frequency of signals it can carry. This limited range is called the
bandwidth.
54. Difference between bit rate and baud rate.
Bit rate is the number of bits transmitted during one second whereas baud rate refers to the number of signal units per
second that are required to represent
those bits.
baud rate = bit rate / N
where N is no-of-bits represented by each signal shift.
55. What is MAC address
Computer Networks Interview Questions
The address for a device as it is identified at the Media Access Control (MAC) layer in the network architecture. MAC
address is usually stored in ROM on the network
adapter card and is unique.
56. What is attenuation
The degeneration of a signal over distance on a network cable is called attenuation.
57. What is cladding
A layer of a glass surrounding the center fiber of glass inside a fiber-optic cable.
58. What is RAID
A method for providing fault tolerance by using multiple hard disk drives.
59. What is NETBIOS and NETBEUI
NETBIOS is a programming interface that allows I/O requests to be sent to and received from a remote computer and it
hides the networking hardware from applications.
NETBEUI is NetBIOS extended user interface. A transport protocol designed by microsoft and IBM for the use on small
subnets.
60. What is redirector
Redirector is software that intercepts file or prints I/O requests and translates them into network requests. This comes
under presentation layer.
61. 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.
62. What is terminal emulation, in which layer it comes
Telnet is also called as terminal emulation. It belongs to application layer.
63. What is frame relay, in which layer it comes
Frame relay is a packet switching technology. It will operate in the data link layer.
64. What do you meant by "triple X" in Networks
The function of PAD (Packet Assembler Disassembler) is described in a document known as X.3. The standard protocol
has been defined between the terminal and the
PAD, called X.28; another standard protocol exists between hte PAD and the network, called X.29. Together, these
three recommendations are often called "triple X"
65. What is SAP
Series of interface points that allow other computers to communicate with the other layers of network protocol stack.
Computer Networks Interview Questions
66. What is subnet
A generic term for section of a large networks usually separated by a bridge or router.
67. What is Brouter
Hybrid devices that combine the features of both bridges and routers.
68. How Gateway is different from Routers
A gateway operates at the upper levels of the OSI model and translates information between two completely different
network architectures or data formats.
69. What are the different type of networking / internetworking devices
Repeater:
Also called a regenerator, it is an electronic device that operates only at physical layer. It receives the signal in the
network before it becomes weak, regenerates the original
bit pattern and puts the refreshed copy back in to the link.
Bridges:
These operate both in the physical and data link layers of LANs of same type. They divide a larger network in to smaller
segments. They contain logic that allow them to
keep the traffic for each segment separate and thus are repeaters that relay a frame only the side of the segment
containing the intended recipent and control congestion.
Routers:
They relay packets among multiple interconnected networks (i.e. LANs of different type). They operate in the physical,
data link and network layers. They contain software
that enable them to determine which of the several possible paths is the best for a particular transmission.
Gateways:
They relay packets among networks that have different protocols (e.g. between a LAN and a WAN). They accept a
packet formatted for one protocol and convert it to a
packet formatted for another protocol before forwarding it. They operate in all seven layers of the OSI model.
70. What is mesh network
A network in which there are multiple network links between computers to provide multiple paths for data to travel.
71. 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.
72. What are the important topologies for networks
BUS topology:
In this each computer is directly connected to primary network cable in a single line.
Advantages:
Inexpensive, easy to install, simple to understand, easy to extend.
STAR topology:
In this all computers are connected using a central hub.
Advantages:
Computer Networks Interview Questions
Can be inexpensive, easy to install and reconfigure and easy to trouble shoot physical problems.
RING topology:
In this all computers are connected in loop.
Advantages:
All computers have equal access to network media, installation can be simple, and signal does not degrade as much as
in other topologies because each computer
regenerates it.
73. What are major types of networks and explain
Server-based network
Peer-to-peer network
Peer-to-peer network, computers can act as both servers sharing resources and as clients using the resources.
Server-based networks provide centralized control of network resources and rely on server computers to provide
security and network administration
74. What is Protocol Data Unit
The data unit in the LLC level is called the protocol data unit (PDU). The PDU contains of four fields a destination
service access point (DSAP), a source service access
point (SSAP), a control field and an information field. DSAP, SSAP are addresses used by the LLC to identify the
protocol stacks on the receiving and sending machines
that are generating and using the data. The control field specifies whether the PDU frame is a information frame (I -
frame) or a supervisory frame (S - frame) or a
unnumbered frame (U - frame).
75. What is difference between baseband and broadband transmission
In a baseband transmission, the entire bandwidth of the cable is consumed by a single signal. In broadband
transmission, signals are sent on multiple frequencies, allowing
multiple signals to be sent simultaneously.
76. What are the possible ways of data exchange
(i) Simplex (ii) Half-duplex (iii) Full-duplex.
77. What are the types of Transmission media
Signals are usually transmitted over some transmission media that are broadly classified in to two categories.
Guided Media:
These are those that provide a conduit from one device to another that include twisted-pair, coaxial cable and fiber-optic
cable. A signal traveling along any of these media
is directed and is contained by the physical limits of the medium. Twisted-pair and coaxial cable use metallic that accept
and transport signals in the form of electrical
current. Optical fiber is a glass or plastic cable that accepts and transports signals in the form of light.
Unguided Media:
This is the wireless media that transport electromagnetic waves without using a physical conductor. Signals are
broadcast either through air. This is done through radio
communication, satellite communication and cellular telephony.
78. What is point-to-point protocol
Computer Networks Interview Questions
A communications protocol used to connect computers to remote networking services including Internet service
providers.
79. What are the two types of transmission technology available
(i) Broadcast and (ii) point-to-point
80. Difference between the communication and transmission.
Transmission is a physical movement of information and concern issues like bit polarity, synchronization, clock etc.
Communication means the meaning full exchange of information between two communication media.
Related Posts Plugin for WordPress, Blogger...