Friday, November 28, 2008

PLACEMENT INTERVIEW QUESTIONS WITH SOLUTION

A piece of message: prepare for every basic and conceptual questions . Interviewer mostly asking easy but tricky and conceptual questions so try to have a good command over all such questios..like. defintion of datastructure, abstraction ,algorithm,cmplexity,dbms,pointer,function recursion,window OS,kernel, normalisation.


Q.What is the difference between MS-DOS and Window-95 operating system?

Ans: - MS-DOS: - It is a 16-bit, single-user, command-line oriented operating system. MS-DOS is developed by Microsoft in 1981.At that time it was only useful for IBM 8088 based personal computer.It supports total only 11 character file name, 8 characters for file name and 3 characters for extension.

Windows-95:- This is developed by Microsoft in 1995.It transfers all the features of MS-DOS into GUI.Window-95 consisting of all most all the best features likes virtual memory, process management and multiprogramming.It can support long filenames.


Q. What is the difference between oracle 9i and oracle 10g?

Ans: - Oracle 9i is the database which supports internet computing (as in 9i, i stands for internet) developed by Oracle workgroup. It is based on relational database management system.

Oracle 10g is an advanced or extended version of oracle 9i which adds the unique feature of GUI interface that allow us to manage our database without having the knowledge of command line syntax(in the name 10g,g stands for GUI). Oracle 10g also supports Automatic storage management, memory management and transparent data encryption.


Q. What do you mean by instances and schema?

Ans:  Instances: - The collection of information stored in the database at a particular moment is called an instance of the database.

Schema: - The detailed description of the database is called the schema.

Description means table name, field, column name, data type etc.

There are three types of schema: -

                             Physical or internal Schema.

                             Conceptual schema.

                             External schema

 

Q. What is the difference between DBMS and RDBMS?

Ans:- DBMS is a collection of programs that allows us to create and maintain a database for various applications. It provides an efficient data access, data independence and data integrity. In DBMS tables are not related. In DBMS only one user can access the same database, at the same time. - Ex: - FoxPro data files and earlier Ms Access.

 In RDBMS many users simultaneously access the same database and  tables are related. This approach is developed by E.F.codd. In this approach data are stored in tabular format by the means of rows and columns where the columns name should be unique. The main advantage of an RDBMS is that it supports referential integrity i.e. relationship between related record and table using Foreign Keys.

Ex: - oracle, SQL, My SQL, DB 2.

 


Q. What is kernel? ////very important

Ans: - Kernel connects the application software to the hardware of the computer. This is central component of computer operating system.

The primary purpose of kernel is to mange the computer resources and allows other program to run and use these resources. Typically, the resources consist of –CPU, computer memory, I/O device, maintain the file system.

Program interacts with the kernel through nearly 100 system calls. System calls tell the kernel to carry out various tasks for the program such as opening a file, writing to a file, closing the file, execute the program, terminating a process.



Q. What is the difference between GROUP BY and HAVING sql clause?

Ans: - Both the clause is used for the retrieval of selective rows.

 GROUP BY clause groups the rows based on the distinct values that exits for specified column. It creates a data set, containing several set of records grouped together based on a condition.

e.g.: select name, roll _no from student group by roll_no;

          Above queries displays the name and roll_no of students based on the increasing order of  roll_no.

HAVING clause is used in conjunction with GROUP BY clause. HAVING adds some extra condition on the GROUP BY clause, it further filtrates the data set created by GROUP BY CLAUSE.

 e.g.: select name, roll _no from student group by roll_no HAVING marks > 100;

          Above queries displays the name and roll_no of students based on the increasing order of  roll_no whose marks is greater than 100.

 

 

  Q. What is dual?

Ans: Dual is a dummy table provided by oracle which supports arithmetic calculation and date retrieval and it’s formatting.

It is a small worktable consists of only one row and one column.

e.g.: select 3*3 from dual;

       Output = 9;

Select sysdate from dual;

Here sysdate is a pseudo column in the dual table that contain current date and time.

 

 Q. What is abstraction?

Ans:  An abstraction is an act of representing essential features of something without including much background and implementation details.


Q. What is the difference between function and procedure?

Ans: - A procedure or function is a logically set of SQL and PL/SQL statement that perform a specific task. A function must return a value back to the caller. A function can return only one variable to the calling PL/SQL code block whereas in case of procedure multiple values can be return to the caller by defining multiple OUT parameters.

 But in normal way a function is a portion of code within a larger program which serves a single purpose. For example, we could write a function to find the factorial of a number. Then, any time in our code when we want to calculate the factorial of a number we could use that function instead of writing that code over again each time.

A procedure is some finite steps to perform a task in some specific order.

 

Q. What is query and query language?

Ans: - A query is a statement requesting retrieval, insertion, updatation or deletion of information from some table or database and the language which enables the user to access or manipulate data as organized by the appropriate data model is called query language. SQL (structured query language) is the most widely used query language. 

 

Q. What is the database and database system?

Ans: - Database is a tool to store the interrelated data in tabular format for efficient retrieval and maintenance whereas database and DBMS together is called database system.

 

Q. What is shell?

Ans: - Shell is the part of the operating system that acts as the intermediate between Kernel and user. It works as the command interpreter as it reads the command given by the user and interprets them and sends request to execute the program.


Q. What do you mean by Inode table?

Ans: - Inode table contains the information related to all the files (not content) that are stored on the disk. It keeps the information like –file owner, identifier, file type, file access permission, number of links and file size.


Q. What is GRUB?

Ans: - GRUB stands for grant unified boot loader. It is the command line interface available at boot prompt to write a temporary boot command, view the contents of the file on the file system.

Q. What is template?

Ans: -Template is mechanism to implement the concept of generic programming. It allows us to generate a family of functions or family of functions to handle different data type.

E.g.: - template .


Q. What do you mean by namespace?

Ans:-Namespace defines a scope for identifiers that are used in a program.

E.g.:- namespace std

This will bring all the identifiers defined in std to the current global scope.

difference between Window 95, windows 98indows2000 and window xp operating system?

Q. What is the difference between Window-95 and Window-98 operating system?

Ans: Window 95 was not a full 32-bit operating system, it uses MS-DOS file system with all its limitations. To overcome the problem associated with Window95, Window98 was released in 1998 by Microsoft. There are not many differences between both but window 98 supports internet functionalities and   user interface. 

 

Q. What is the difference between windows98 and windows 2000 operating system?

Ans: - Windows 2000 was released in 2000 by Microsoft to incorporate significant changes over the other windows operating system. The main advantage of windows 2000 over window98 is in terms of distributed file system, increased memory capacity, increased speed, better networking support, laptop support and support for more processor.

 

Q. What is the difference between windows 2000 and windows XP operating system?

 Ans:-Windows XP was released in October 2001 by Microsoft to provide more security, reliability, application compatibility, extensibility and international support. It updates the graphical user interface (GUI) with a visual design that takes advantages of more recent hardware and many new ease-of-use features.

Windows XP is a multi-user operating system, supporting simultaneous access through distributed services.       

   

difference between truncate and delete sql command?

Q. What is the difference between truncate and delete sql command?

·        Ans:  Condition can be given in delete command but not in truncate. The DELETE statement does not ask for confirmation. However, the delete operation is not made permanent until the data transaction is committed.

·         DELETE is a DML command. In DELETE we can undo the operation with the ROLLBACK statement if we make a mistake. TRUNCATE is a DDL command and we cannot roll back row removal when using TRUNCATE.

 

·        The TRUNCATE TABLE statement Removes all rows from a table and releases the storage space used by that table.

·        The DELETE statement can also remove all rows from a table, but it does not release storage space.

·        Removing rows with the TRUNCATE statement is faster than removing them with the DELETE because it does not generates the roll back information.

 

difference between delete and drop sql command

Q. What is the difference between delete and drop sql command?

Ans: - Delete command in SQL is used to remove either all the rows or tuples from table or a set of rows from the table but schema or relation remains there. We can roll back the DELETE TABLE statement.

 But drop command deletes all the tuples as well as the schema or structure of the table. When a table is dropped no tuples can be inserted into table unless it is re-created with the create table command. We cannot roll back the DROP TABLE statement.

 

DATA ABSTRACTION and ABSTRACT DATA TYPE(ADT)

Q. What is abstract data type (ADT)?

Ans: - An abstraction that describes a set of objects in terms of hidden data and operations on that data is called as ADT.
We can define an ADT as a mathematical model with a collection of operations defined on that model without concerning how the operations are implemented.
In defining an ADT we are not concerned with the time and space complexity as these are implementation issues.
E.g.:- each stack, queue is an ADT because while using it we are not bothering about its implantation as it can be implemented by array, structure, or linked list.


Q. What is data abstraction or abstract view of data?

Ans: - Data abstraction is an act of hiding certain details of how the data are stored and maintained. This is an important feature of database because users have not to worried about technical and implementations aspects. Since many database-system users are not computer trained, developers hide the complexity through various levels of abstractions.


Q. What are the various levels of data abstractions?
Ans:- There are three levels of data abstractions: -

(a)Physical level abstractions: -
This is the lowest level of abstraction. It describes how the data is actually stored and access path for the database and interacts with the physical hard disk. Function of physical layer is to provide data retrieve and data storage methodology. For example creating a cluster and non clustering index.

(b)Logical or conceptual level abstraction: -
This layer describes what data are stored in the database and what the relationship among those data is. Basic function of this layer is to provide data declaration and techniques such as creating tables and relating tables.

(c) View level: -
This layer is also known as external level. View layer basically deals with providing a copy of original database for every user to access the database. In a database design there is only one physical and conceptual layer but there can be many number of views level.

Thursday, November 27, 2008

operating system(os) placement questions with solution

Q. What is Operating System (OS)?

Ans: -Operating system is the organized collection of software that controls the overall operation of a computer.

  • Operating system is a collection of programs and utilities.
  • It acts as the interface between hardware and users of a computer system.
  • It consists of controlled routines for operating the computer system by providing an environment where users can execute the program in an effective and efficient manner.



Q.What is the functions of operating system?

Ans: - (1) Acts as an interface.

(2) Resource Manager:-

(a)Process Management.

(b) Memory Management.

(c) File System Management.

(d)Input/Output Management.

(3) Command Interpreter:-

(a)CLI (Character language Interface)

(b)GUI (Graphics User Interface)

(4)Security and Protection.

(5)Accounting: - which user uses how much and what kind of resources.


Q. what is the difference between CLI and GUI command Interpreter?

Ans:- CLI (Character Language interface):- This allows the user to directly enter commands that are to be performed by operating system.

GUI (graphics user interface):-

This allows the users to interface with operating system via graphical user interface.

  • This is user friendly and provides menu and mouse based facility.


Q. What are the different types of Operating System (OS)?

Ans: - (1) Single Programmed operating system.

(2)Multi programming (MP) operating system.

(3)Batched MP operating system.

(4)Time shared operating system

(5)Multiprocessing operating system.

(6)Distributed operating system.

(7)Real time operating system.


Q.What do you mean by multiprogramming? ////very very conceptual

Ans: - In multiprogramming the main memory consist of multiple numbers of tasks at a time. It is a technique to execute a number of programs simultaneously by a single processor.

· In reality CPU is executing one task at a time but completing so fast and switching to the next task very quickly in such a way that one can not notice it and we are saying that CPU is doing multiple tasks.

· In multiprogramming environment as long as one job needs to execute, the CPU is never idle.


Q. Give a practical example of multiprogramming?

Ans: Working of a lawyer is an example of multiprogramming.

A lawyer does not work for only one client at a time. While one case is waiting to go to trial, he switches to another case and working on that and so on. If he has enough clients, the lawyer will never be idle.



Q.What are the advantages of multiprogramming.

Ans: - (1) It increases the CPU utilization.

(2) Provides effective memory utilization.

(3) Throughput of the CPU may also increase.



Q.What is the disadvantage of multiprogramming?

Ans:-Managing too many tasks simultaneously can create the overhead on the processor and may degrade the performance. In particular, systems that use swapping may have insufficient memory recourses to handle all the tasks, leading to a condition known as ‘thrashing’.

Q. What is the difference between single programmed and multiprogramming operating system?

Ans: - In single programmed operating system only one program is allowed to stay in memory. The CPU is devoting its all time in executing the same program. As a single program can’t make the CPU busy always and hence CPU is under utilized in single programmed operating system.

Multiprogramming operating system maximizes the CPU and I/O devices utilizations by keeping multiple programs in memory and executing them one by one quickly.



Q. What do you mean by batched processing or batch operating system?

Ans: - In this type of processing a group of jobs are batched together and executed at a time. In batch processing technique the same type of jobs are batched together and executed at a time.

· This is non-interactive processing.



Q. what is time sharing system?

Ans: - Time – sharing system is a logical extension of multiprogramming.

· In this system a fixed time slice is defined for each program or job.

· When time slot expired the CPU switches from one program to another.

· Operating system explicitly says how CPU will be shared to different programs.

· Main feature of this type of system is that user can interact with the job when it is executing.

· This supports efficient CPU utilization.

· Example of time- sharing system is –CTSS, Multics, Cal, and UNIX.



Q.What is real-time operating system?

Ans: - A real time operating system is means for completing the task within specific time constraint.

  • It works with very rigid requirement to complete the processing of input data in a specified time.
  • Processing must be done within defined constraint.
  • In real-time systems, the correctness of a processing task is dependent on the wall clock time at which the processing occurred.
  • Use of real-time system is done in the field of- Military operation,

Industrial control system

Robotics.

Computer controlled system.