Skip to main content


Showing posts from May, 2014

C++ Program Using Single Inheritance - Display The Personal Details & Residential Details Of A Person.

This is a sample program on Inheritance. Using Inheritance here we display the personal details and residential details of a person.

#include <iostream.h>
#include <conio.h>
#include <stdio.h>

class Person
  int personid, age;
  char name[25];

  void read1()
     cout<<"Enter the name, id and age of the person";
     gets (name);

 void print1()
     cout<<'\n'<<'\n'<<"******Details entered******"<<'\n';
     cout<<"Name: "<< name<<'\n';
     cout<<"Age: "<<age<<'\n';
     cout<<"Id: "<<personid<<'\n'<<'\n'<<'\n';

class address: public Person
  int hno;
  char hname[25], sname[25], po[10];

  void read2()

Database/DBMS Interview Questions And Answers - Part XX.

82. What Is A Trigger? What Are The Types Of Trigger?

Triggers are database object. Basically these are special type of stored procedure that is automatically fired / executed when a DDL or DML command statement related with the trigger is executed. They can be executed automatically on the insert, delete and update operation.

Trigger allows us to execute a batch of SQL code when an insert, update or delete command is executed against a specific table.

Triggers are generally used to implement business rules, auditing. Triggers can also be used to extend the referential integrity checks, but wherever possible, use constraints for this purpose, instead of triggers, as constraints are much faster.

In SQL Server we can create four types of triggers

Data Definition Language (DDL) triggers.Data Manipulation Language (DML) triggers.
After Trigger (using FOR/AFTER CLAUSE)Instead of Trigger (using INSTEAD OF CLAUSE)
Common Language Runtime (CLR) triggers.Logon triggers.
83. What Are Data Definition …

Operating System (OS) Interview Questions And Answers - Part XIII.

61. Multicore Systems Present Certain Challenges For Multithreaded Programming. Briefly Describe These Challenges.

Multicore systems have placed more pleasure on system programmers as well as application developers to make efficient use of the multiple computing cores. These challenges include determining how to divide applications into separate tasks that can run in parallel on the different cores. These tasks must be balanced such that each task is doing an equal amount of work.

Just as tasks must be separated, data must also be divided so that it can be accessed, data dependencies must be identified and where such dependencies exist, data accesses must be synchronized to ensure the safety of the data. Once all such challenges have been met, there remains considerable challenges testing and debugging such applications.

62. What Is A Thread Pool & Why Is It Used?

A thread pool is a collection of threads, created at process startup, that sit and wait for work to be allocated to th…

Operating System (OS) Interview Questions And Answers - Part XII.

56. State The Advantages & Disadvantages Of Kernel Level Threads?

Kernel can simultaneously schedule multiple threads from the same process on multiple processes.If one thread in a process is blocked, the Kernel can schedule another thread of the same process.Kernel routines themselves can multithreaded.Disadvantages
Kernel threads are generally slower to create and manage than the user threads.Transfer of control from one thread to another within same process requires a mode switch to the Kernel.

57. State The Basic Differences Between Process & Thread?

The differences between process and threads are:
Process is heavy weight or resource intensive whereas Thread is light weight taking lesser resources than a process.Process switching needs interaction with operating system whereas Thread switching does not need to interact with operating system.In multiple processing environments each process executes the same code but has its own memory and file resources whereas all thr…

Operating System (OS) Interview Questions And Answers - Part XI.

51. What Is A Thread? Why Is It Used?

Thread is a flow of execution through the process code, with its own program counter, system registers and stack. A thread is also called a light weight process. Threads provide a way to improve application performance through parallelism. Threads represent a software approach to improving performance of operating system by reducing the overhead thread is equivalent to a classical process.

Each thread belongs to exactly one process and no thread can exist outside a process. Each thread represents a separate flow of control. Threads have been successfully used in implementing network servers and web server.

Following are the reasons why we use threads in designing operating systems.
A process with multiple threads makes a great server for example printer server. Because threads can share common data, they do not need to use inter-process communication. Because of the very nature, threads can take advantage of multiprocessors.
52.What Are The Advantag…

Operating System (OS) Interview Questions And Answers - Part X.

46. What Are Schedulers & What Are Types Of Schedulers?

Schedulers are special system software which handles process scheduling in various ways. Their main task is to select the jobs to be submitted into the system and to decide which process to run.

Schedulers are of three types:
Long Term Scheduler.Short Term Scheduler.Medium Term Scheduler.

47. Explain The Importance Of Long Term Scheduler, Short Term Scheduler & Medium Term Scheduler?

Long Term Scheduler is also called job scheduler. Long term scheduler determines which programs are admitted to the system for processing. Job scheduler selects processes from the queue and loads them into memory for execution. Process loads into the memory for CPU scheduling. The primary objective of the job scheduler is to provide a balanced mix of jobs, such as I/O bound and processor bound. It also controls the degree of multiprogramming. If the degree of multiprogramming is stable, then the average rate of process creation must be equal to …

Operating System (OS) Interview Questions And Answers - Part IX.

41. What Is A PCB? Explain The Structure Of Process Control Block?

Process Control block is used for storing the collection of information about the processes and this is also called as the Data Structure which Stores the information about the process. The information of the Process is used by the CPU at the Run time.

A process control block in an operating system will at least have the following information:
Process State: Information about the current state of the process, from new, ready, running, terminated. Program Counter: States the location for the next command to be run for the same process. CPU Register: State information on various types of registers is stored during interrupts for continuity to occur correctly when process resumes. Memory Management Information: State data on memory is stored such as page tables, limit registers, or segment tables. Accounting Information: Stores state data on values of CPU and real time utilized, time limits, account numbers, job or process nu…

Why Do You Want To Leave Your Current Job/Organization/Company? - Job Interview Answers.

This question looks very simple but it’s not that easy to answer it. What ever may be the reason always be truthful. Never bad-mouth your previous company, superiors and co-workers because it will definitely sound negative on your part. If you do so, the interviewer may think you may talk bad about his company the next time you’re looking for another job.

Also never speak a lie if you were fired. A background check will easily reveal everything. Try to deflect the reason from you personally. If your firing was the result of a takeover, merger, division wide layoff,  etc. tell them you were fired not for your mistakes or non performance but for the above reasons. If you were fired for not adhering to a company policy, tell the interviewer that you were asked to leave for violating a company policy which you felt was not communicated to you properly.

"Saying the truth will never let you down but will create a good impression on the interviewer."

There are many wrong answers to…

What Are Your Salary Expectations? - Job Interview Answers.

Never bring up the salary topic. Always allow the interviewer to do it first. Do not give a figure right away. If you state a figure you risk stating something that is too high or something that is too low. In either case the loss is yours. Many a times peoples and friends around us suggest saying something as “I’m sure whatever I am offered will be a fair price”. No doubt it’s a safe answer but I would recommend answering this question with a range.

The thumb rule of any negotiations is: The side with more information wins. Try to learn what the employer is willing to pay before you reveal what you’re willing to accept.

Hence when asked about salary, you can say:

“I’m sure the company has already established a salary range for this position. Can you tell me what that is?”


“I want an income commensurate with my ability and qualifications. I trust you’ll be fair with me. What does this position pay?”

- If you have some idea regarding the pay for the position, then just state something…

Why Do You Want To Work For Our Company? - Job Interview Answers.

The interviewer wants to know why you chose to serve his company. Basically this question is asked to people having experience in their respective field. Don’t start babbling and don’t give a short answer. Do some research about the company and then answer this question by associating sufficient data and information. Try to find out the status of the company, the turnover of the company, why this company is best among the competitors, etc. Such information will help you to answer in the best possible manner.

Try to gather information from annual reports, company’s website, articles about the company and the corporate newsletter.

Your answers can be:

1) Three reasons why I would like to work for your company are:

- Since your company provides a strong core competency, very strong value systems and best practices so I believe I have a strong vision of viewing myself as a project leader in your company.

- Your company has one of the fastest growth rates and turnover in the industry and t…

Do You Prefer To Work Alone Or As A Team Player? - Job Interview Answers.

When interviewer asks such questions it means they are trying to learn whether you are a team player or you like working independently. Even if you have a strong preference to work alone or with others, the best answer is to say both. If a job is mostly about working alone, there might be some team work involved.

"There’s no work or job which doesn’t need team work at some point of time."

The reality is that most jobs require us to work both independently and in teams. Your response to this question should show that you have been successful in both situations. Most employers want someone who can work well in a team and work well alone.

Your answers can be:

1) I would like to work in an environment where there is a blend of both. Its great working in teams while sharing and learning ideas with each other, but it’s also great to sit at my own desk and work hard productively. Therefore I would like to work independently towards a team goal.

2) I believe both are two sides of the …

What Are Your Expectations From The Job? - Job Interview Answers.


The interviewer simply wants to check out what you are expecting from the job. Never relate your answer to position, status or money associated with the job. Your answer should show that you are really determined to add value to the organization and yourself too.

Your answers can be:

1) I would like a job which gives me a chance to apply all that I have learned in college and enable me to grow as a professional. I would like a role which enables me to make a difference and improve my skills.

2) Great learning opportunities, challenging roles, rational career progression and good job satisfaction. I would also like to work for an organization that gives me an opportunity to serve the organization, the society and above all my country.

3) I seek three things from the job: Competence, Challenging Roles and learning opportunities. I want a position where I can apply my skills and abilities at par so that I can…

How Do You Determine Or Evaluate Success?- Interview Answers.

Here the interviewer simply wants to know what success means to you in your professional and personal life. Many people view success in terms of power, wealth, or fame. But many of the most enduring and satisfying forms of success have nothing do with acquiring power, wealth, or fame.

Success is what you make it. For some people it is just keeping busy, having fun and enjoying life as never before.

Your answers can be:

1) If my contribution has positively benefited my company, than that’s “Success” for me. From the personal front, success to me is fulfilling my parents dream.

2) Success to me is to set a goal, plan the steps to achieve the goal, implement the plan and finally achieve the goal.

"Success is not a destination it's a journey, it's the direction in which you are traveling."

3) Success to me means satisfaction for whatever I do. If I am at my workplace, positive result gives me the satisfaction and at home happiness in parent’s eyes gives me the satisfactio…