1.     A set of rules, which enable orderly exchange of information between two devices.
a)  Topology      b) Protocol       c) Transmission Media       d) None of the above

2. ISO stands for
a) International Standards Organization        b) International Organization for Standardization
c) Both of above                                            d) None of above

3. Proposal for a new Internet standard is called
a)     RFC             b) Internet draft           c) Draft Standard            d) Proposed Standard

4. The data sent between layers is called
a)     Protocol Data Unit        b) Datagram          c) Service Data Unit          d) Packet

5.The Private Automatic Branch Exchange is an example of
      a) Bus Topology       b) Ring Topology       c) Tree Topology     d) Star Topology

6. Topology, which connects every single node in the network to every other node, is
      a) Star           b) Ring          c) Mesh          d) Bus

7. Which of the following is not a hybrid topology
      a) Tree          b) String        c) Bus            d) None of the above


Linux interview questions
What is Kernel? Explain the task it performs. 
Kernel is used in UNIX like systems and is considered to be the heart of the operating system. It is responsible for communication between hardware and software components. It is primarily used for managing the systems resources as well.
Kernel Activities:
The Kernel task manager allows tasks to run concurrently.
Managing the computer resources: Kernel allows the other programs to run and use the resources

Resources include i/o devices, CPU, memory.
Kernel is responsible for Process management. It allows multiple processes to run simultaneously allowing user to multitask.
Kernel has an access to the systems memory and allows the processes to access the memory when required.
Processes may also need to access the devices attached to the system. Kernel assists the processes in doing so.




Java interview questions

What are Native methods in Java?

Java applications can call code written in C, C++, or assembler. This is sometimes done for performance and sometimes to access the underlying host operating system or GUI API using the JNI.

The steps for doing that are:

  • First write the Java code and compile it
  • Then create a C header file
  • Create C stubs file
  • Write the C code
  • Create shared code library (or DLL)
  • Run application


What are class loaders?

The class loader describes the behavior of converting a named class into the bits responsible for implementing that class.

Class loaders eradicate the JREs need to know anything about files and file systems when running Java programs.

A class loader creates a flat name space of class bodies that are referenced by a string name and are written as:

Class r = loadClass(String className, boolean resolveIt);


What is Reflection API in Java?

The Reflection API allows Java code to examine classes and objects at run time. The new reflection classes allow you to call another class's methods dynamically at run time. With the reflection classes, you can also examine an instance's fields and change the fields' contents.

The Reflection API consists of the java.lang.Class class and the java.lang.reflect classes: Field, Method, Constructor, Array, and Modifier.



SQL Server interview questions


Explain the use of keyword WITH ENCRYPTION. Create a Store Procedure with Encryption.

It is a way to convert the original text of the stored procedure into encrypted form. The stored procedure gets obfuscated and the output of this is not visible to

CREATE PROCEDURE Abc
WITH ENCRYPTION
AS
<<    SELECT statement>>
GO


What is a linked server in SQL Server?

It enables SQL server to address diverse data sources like OLE DB similarly. It allows Remote server access and has the ability to issue distributed queries, updates, commands and transactions.


Features and concepts of Analysis Services

Analysis Services is a middle tier server for analytical processing, OLAP, and Data mining. It manages multidimensional cubes of data and provides access to heaps of information including aggregation of data One can create data mining models from data sources and use it for Business Intelligence also including reporting features.
Some of the key features are:
·         Ease of use with a lot of wizards and designers.
·         Flexible data model creation and management
·         Scalable architecture to handle OLAP
·         Provides integration of administration tools, data sources, security, caching, and reporting etc.
·         Provides extensive support for custom applications


What is Analysis service repository?

Every Analysis server has a repository to store metadata for the objects  like cubes, data sources etc. It’s by default stored in a MS Access database which can be also migrated to a SQL Server database.


What is SQL service broker?

Service Broker allows internal and external processes to send and receive guaranteed, asynchronous messaging. Messages can also be sent to remote servers hosting databases as well. The concept of queues is used by the broker to put a message in a queue and continue with other applications asynchronously. This enables client applications to process messages at their leisure without blocking the broker. Service Broker uses the concepts of message ordering, coordination, multithreading and receiver management to solve some major message queuing problems. It allows for loosely coupled services, for database applications.


What is user defined datatypes and when you should go for them?

User defined data types are based on system data types. They should be used when multiple tables need to store the same type of data in a column and you need to ensure that all these columns are exactly the same including length, and nullability.
Parameters for user defined datatype:
Name
System data type on which user defined data type is based upon.
Nullability.
For example, a user-defined data type called post_code could be created based on char system data type.


What is bit datatype?

A bit datatype is an integer data type which can store either a 0 or 1 or null value.


Describe the XML support SQL server extends.
SQL Server (server-side) supports 3 major elements:
  1. Creation of XML fragments: This is done from the relational data using FOR XML to the select query. 
  2. Ability to shred xml data to be stored in the database.
  3. Finally, storing the xml data.
Client-side XML support in SQL Server is in the form of SQLXML. It can be described in terms of
  • XML Views:  providing bidirectional mapping between XML schemas and relational tables.
  • Creation of XML Templates:  allows creation of dynamic sections in XML.



PHP interview questions
What is PHP?
PHP (Hyper text Pre Processor) is a scripting language commonly used for web applications. PHP can be easily embedded in HTML. PHP generally runs on a web server. It is available for free and can be used across a variety of servers, operating systems and platforms.
What Is a Session in PHP?
A PHP session is no different from a normal session. It can be used to store information on the server for future use. However this storage is temporary and is flushed out when the site is closed. Sessions can start by first creating a session id (unique) for each user.
Syntax : session_start()
E.g. storing a customer’s information.
Explain the difference between $message and $$message.
$message is used to store variable data. $$message can be used to store variable of a variable. Data stored in $message is fixed while data stored in $$message can be changed dynamically.
E.g. $var1 = ‘Variable 1’
$$var1= ‘variable2’
This can be interpreted as $ Variable 1=‘variable2’;
For me to print value of both variables, I will write
$var1 $($var1)
What Is a Persistent Cookie?
Cookies are used to remember the users. Content of a Persistent cookie remains unchanged even when the browser is closed. ‘Remember me’ generally used for login is the best example for Persistent Cookie.
Explain the differences between require and include, include_once.
Include () will include the file specified.
Include_once () will include the file only once even if the code of the file has been included before.
Require () and include () are the same with respect to handling failures. However, require () results in a fatal error and does not allow the processing of the page.
What is urlencode and urldecode?

C  Questions

Note : All the programs are tested under Turbo C/C++ compilers. 
It is assumed that,
Ø  Programs run under DOS environment,
Ø  The underlying machine is an x86 system,
Ø  Program is compiled using Turbo C/C++ compiler.
The program output may depend on the information based on this assumptions (for example sizeof(int) == 2 may be assumed).

Predict the output or error(s) for the following:

1.      void main()
{
            int  const * p=5;
            printf("%d",++(*p));
}
Answer:
                        Compiler error: Cannot modify a constant value.
Explanation:   
p is a pointer to a "constant integer". But we tried to change the value of the "constant integer".

2.      main()
{
            char s[ ]="man";
            int i;
            for(i=0;s[ i ];i++)
            printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);
}
Answer:
                        mmmm
                       aaaa
                       nnnn
Explanation:
s[i], *(i+s), *(s+i), i[s] are all different ways of expressing the same idea. Generally  array name is the base address for that array. Here s is the base address. i is the index number/displacement from the base address. So, indirecting it with * is same as s[i]. i[s] may be surprising. But in the  case of  C  it is same as s[i].

3.      main()
{
            float me = 1.1;
            double you = 1.1;
            if(me==you)
printf("I love U");
else
                        printf("I hate U");
}
Answer:
I hate U
Explanation:
For floating point numbers (float, double, long double) the values cannot be predicted exactly. Depending on the number of bytes, the precession with of the value  represented varies. Float takes 4 bytes and long double takes 10 bytes. So float stores 0.9 with less precision than long double.
Rule of Thumb:
Never compare or at-least be cautious when using floating point numbers with relational operators (== , >, <, <=, >=,!= ) . 
click here to download technical collection.