Posts

Showing posts from 2014

Tell Me Something About Yourself - Interview Answers.

Try to introduce some of your most important employment-oriented skills as well as your education and accomplishments to the interviewer. Answer to this question is very important because it positions you for the rest of the interview. That's why this statement is often called the " Positioning Statement".

One should take the opportunity to show his/her communication skills by speaking clearly and concisely in an organized manner. Since there is no right or wrong answer for this question hence it is important to appear friendly.



YOUR ANSWERS CAN BE:

1) I am a person with strong interpersonal skills and have the ability to get along well with people. I enjoy challenges and looking for creative solutions to problems.

2) Besides the details given in my resume, I believe in character values, vision and action. I am quick in learning from mistakes. I am confident that the various tests that you have conducted will corroborate my competencies aptitude and right attitude for th…

What Is (Are) Your Strengths? - Interview Answers

This is a simple and popular interview question. Generally people answer it in two ways. There are people who simply state their strength like “I am Young, Dynamic, Intelligent, Smart and so on…”. Such answer is neither right nor wrong but does not help u in any way also.


Secondly there are peoples who state their strengths and explain them how he can use his strength for the job and industry.


Do not simply state your strength. Everyone has some strength, all you need is to convert them into benefits. In short, try to advertise yourself by converting your features into strengths.


“EVERYONE CLAIM THEY ARE HONEST, HARDWORKING, SMART AND SO ON….. BUT
WITH AN EXAMPLE IT IS MUCH MORE BELIEVABLE.”
Your answers can be :

1) I am a hard worker and because of this ability I can work for additional hours to accomplish my tasks.I am commitment oriented and hence I always enjoy the trust and confidence of my team mates which enables me to perform my duties very easily.


2) I am adaptable, so I can h…

Where Do You See Yourself Five (5) Years From Now? - Interview Answers

Well this is a similar question to the short term goals question but you need to answer them differently.


Your answer can be:

1) I see myself as a Senior Software Engineer in your esteemed organization where by with all my enhanced learning and skill, I shall be able to make up a valuable and meaningful contribution to your organization.


2) In five years, I want to be a senior analyst (Senior Software Engineer/Manager/Lead). I want to expertise to directly impact the company in a positive way.


3) Although I really enjoy working as a Software Engineer, I want to eventually become a manager. I want to continue gaining experience, and after learning many different aspects, I see myself in management.




ALSO READ THE ANSWERS FOR:

- Tell Me Something About Yourself ?

- What Are Your Strengths?

- What Are Your Weaknesses?

- How Do You Handle Pressure / Can You Work Well Under Pressure?

- What are your short term goals/career aspirations?

- What are your long term goals/career aspirations?

- What is (…

C++ Program On Multilevel Inheritance-Accept & Display Details Of Employee/Student.

This is a sample C++ program on multilevel inheritance. Using Multilevel Inheritance, this program accept input from the user and displays the details of a student or employee.


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

class person
{
    private:
       int age;
       char name[20];
    public:
       void read()
         {
            cout<<"Enter Age & Name: ";
            cin>>age;
            gets (name);
         }

       void disp()
         {
            cout<<'\n'<<'\n'<<"******Details Of Person******"<<'\n'<<'\n';
            cout<<"Age: "<<age<<'\n';
            cout<<"Name: ";
            puts (name);
         }
};

class student: public person
{
    private:
       int rollno, clss, marks;
    public:
       void read()
         {
            cout<<"Ente…

C++ Program On Inheritance-Accept Details Of A Student & Print Marks Percentage.

This is a sample C++ Program. using inheritance. Using Inheritance, this program accepts details of a student and print marks and percentage using inheritance.


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

class person
{
    private:
        char name [20];
        long int phone;
    public:
        void read ( )
           {
               cout << "Enter Name & Phone Number ";
               cin >> name >> phone;
           }

        void show ( )
           {
               cout << "\n Name Is: " << name;
               cout << "\n Phone Number Is: " << phone;
           }
};

class student : public person
{
    private:
         int rollno;
         char course [20];
    public:
         void read ( )
           {
               person :: read ( );
               cout << "Enter The Roll Number & Course Name ";
               cin >> rollno >> course;
           }

     …

C++ Program On Hybrid Inheritance-Display Mark Details Of A Student.

This is a sample program using Hybrid Inheritance. Using Hybrid Inheritance, this program display mark details of a student.


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

class student
{
    private:
        int rollno;
        char name [20];
    public:
        void read ( )
           {
              cout << "\n Enter The Roll Number & Name: ";
              cin >> rollno >> name;
           }

        void show ( )
           {
              cout << "\n Roll No = " << rollno;
              cout << "\n Name = " << name;
           }
};

class exam_internal : public student
{
    protected:
        int sub1_marks;
        int sub2_marks;
    public:
        void read_marks ( )
           {
              cout << "Enter Internal Marks Of Subject 1 = ";
              cin >> sub1_marks;
              cout << "Enter Internal Marks Of Subject 2 = ";
              cin >…

C++ Program On Multiple Inheritence-Display Marks Of A Students.

This is a sample C++ program on Multiple Inheritance. Using Multiple Inheritance, this program will display marks of a students.


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

class student
{
    protected:
        int rno,m1,m2;
    public:
        void get()
          {
              cout<<"Enter The Roll No: ";
              cin>>rno;
              cout<<"Enter The Marks Gained In Two Subjects:";
              cin>>m1>>m2;
          }
};

class sports
{
    protected:
        int sm;
    public:
        void getsm()
          {
              cout<<"\nEnter The Marks Gained In Sports:";
              cin>>sm;
          }
};

class statement:public student,public sports
{
    int tot,avg;
    public:
        void display()
          {
              tot=(m1+m2+sm);
              avg=tot/3;
              cout<<"\n\n\tRoll No: "<<rno<<"\n\tTotal: "<<tot;
              …

C++ Program On Function Overloading-Find Area of Cube, Sphere.

This is a sample C++ program on function overloading. Using function overloading, this program can find area of figure like Cube, Sphere.


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

void volume (int);
void volume (float);

void main()
{
    int a, r,ch;

    cout<<"*********MENU*********"<<'\n';
    cout<<"1. Cube "<<'\n';
    cout<<"2. Sphere "<<'\n';

    cout<<"Enter Choice: ";
    cin>>ch;

    if (ch==1)
       {
           cout<<"Enter Side:";
           cin>>a;
           volume(a);
       }
    else if(ch==2)
       {
           cout<<"Enter Radius:";
           cin>>r;
           volume(r);
       }

    getch();
}

void volume(int a)
    {
       cout<<"Volume Of Cube = "<<a*a*a<<'\n';
    }

void volume(float r)
    {
       cout<<"Volume Of Sphere

C++ Program On Operator Overloading-Cube Of A Number.

This is a sample C++ Program on Operator Overloading. Using Operator Overloading, this program will find Cube of a number.


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

class Calc
{
    public:

       int operator ( ) (int num)
         {
             int cb = num * num * num;
             return (cb);
         }

};

int main ( )
{
    clrscr ( );
    Calc cube;
    int a, res;

    cout<<"Enter A Number: ";
    cin>>a;
    res = cube (a);

    cout<<"Cube Of " << a << " Is = " << res ;
    getch ( );
    return 0;
}


OUTPUT:

Enter A Number: 6

Cube Of 6 Is = 216


C++ Program Using Operator Overloading-Add Complex Numbers

This is a sample program on operator overloading. Using operator overloading, here we add two complex numbers.


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

class complex
{
    private:

       double real, img;

    public:

       complex ( )
         {
             real = img = 0.0;
         }

       void read ( )
         {
             cout<<"\n Enter Real & Imaginary Part: ";
             cin >> real >> img;
         }

       complex operator + (complex cc2)
         {
             complex temp;
             temp.real = real + cc2.real;
             temp.img = img + cc2.img;
             return (temp);
         }

       void show ( )
         {
             cout<<"The Sum Is: "<<'\n';
             if (img > 0)
                  cout<<real << "+" << img << "i" << endl;
             else
                  cout << real << img …

C++ Program On Operator Overloading-Compare Two Strings.

This is a sample program on operator overloading. Using operator overloading, here the user enters a string and compare it with a predefined string.


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

class string
{
    char st [30];

    public:

       string ( )
         {
             strcpy (st, " ");
         }

       string (char s [ ] )
         {
             strcpy (st, s);
         }

       void display ( )
         {
             cout << st;
         }

       int operator >= (string);

       void read ( )
         {
             cin >> st;
         }

};

int string :: operator >= (string ss2)
{
    if (strcmp (st, ss2.st) >= 0)
       return (1);
    else
       return (0);
}

int main ( )
{
    clrscr ( );
    string s1 ="Hello World";
    string s2;

    cout<<"Enter String: ";
    s2.read ( );

    if ( s1 >= s2)
       cout<<"Alphabetically The String You Enter…

C++ Program On Operator Overloading-Concatenate Two Strings.

This is a sample C++ program on Operator Overloading. Using Operator Overloading, here we will concatenate two strings.


#include <iostream.h>
#include <conio.h>
#include <string.h>
#define SIZE 40

class string
{
    char st [SIZE];

    public:

      string ( )
        {
           strcpy (st, " ");
        }

      string (char s[ ] )
        {
           strcpy (st, s);
        }

      void show ( )
        {
           cout << st;
        }

    string operator+ (string);

};

string string :: operator+ (string ss2)
{
string temp;
strcpy (temp.st, st);
strcat (temp.st, ss2.st);
return (temp);
}

int main ( )
{
clrscr ( );
string s1 = "Good";
string s2 = "Day :)";
string s3;

cout << "The Strings Before Concatenation Is \n ";
cout << "String1 = ";
s1.show ( );

cout << " \n String2 = ";
s2.show ( );
s3 = s1 + s2;

cout << "\nThe Strings After Concatenation Is \n &quo…

C++ Program On Constructor Overloading-Calculate Area Of Rectangle

This is a sample C++ program on Constructor Overloading. Using Constructor Overloading, here we calculate area of rectangles with default values.


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

class rectangle
{
    private:
       int length, breadth;

    public:

       rectangle ( )
        {
            length = breadth = 0;
            cout<<"Constructor With Zero Parameter Called.\n";
        }

       rectangle (int a)
        {
            length = breadth = a;
            cout<<"Constructor With One Parameter Called. \n";
        }

       rectangle (int a, int b)
        {
            length = a; breadth = b;
            cout<<"Constructor With Two Parameters Called. \n";
        }

       int area ( )
        {
            return (length*breadth);
        }

};


int main ( )
{
    clrscr ( );
    rectangle r1;
    rectangle r2 (10);
    rectangle r3 (10, 15);

    cout<<"\n Area Of First Rectangle = "<<r1.a…

C++ Program On Friend Class-Find Mean Of Two Numbers.

This is a sample program On using Friend Classes. Using Friend class, here we try to find the mean of two numbers.


#include <iostream.h>
#include <conio.h>
class num
{
    int a,b;

    public:

       void read()
         {
            cout<<"Enter Two Numbers: ";
            cin>>a>>b;
         }

       friend void mean(num x)
         {
            int k;
            k=(x.a+x.b)/2;
            cout<<"Arithmetic Mean: "<<k;
         }

};

void main()
{
    clrscr();
    num n;
    n.read();
    mean (n);
    getch();
}


OUTPUT:

Enter Two Numbers:
18
12

Arithmetic Mean: 15



C++ Program Using Friend Class-Add Two Time Together.

This is a sample program using Friend Classes. Using Friend Classes, here we add two different time together & display the final time.


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

class time
{
    private:
       int h, m, s;

    public:

       void read()
         {
             cout<<"Enter Time In Hours:Minutes:Seconds \n";
             cin>>h>>m>>s;
         }

       friend void add(time t1, time t2, time t3)
         {
             t3.h=t1.h+t2.h;
             t3.m=t1.m+t2.m;
             t3.s=t1.s+t2.s;

             if (t3.s>=60)
               {
                   t3.m+=t3.s/60;
                   t3.s=t3.s%60;
               }

             if(t3.m>=60)
               {
                   t3.h+=t3.m/60;
                   t3.m=t3.m%60;
               }

             cout<<"\n New Time:"<<t3.h<<" Hours "<<t3.m<<" Minutes "<<t3.s<< " Seconds ";
    …

C++ Program Using Encapsulation-Display Student Details.

This is a sample C++ Program On Encapsulation. Using Encapsulation, here we ask the user to input details and then display the details of a student.

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

class student
{
   private:
      int roll;
      char name[25];

   public:

      void read()
        {
            cout<<"Enter Roll Number & Name Of The Student";
            cin>>roll;
            gets(name);
        }

       void print()
        {
            cout<<"Roll Number & Name Of The Student Is:";
            puts(name);
            cout<<roll;
        }

};

void main()
{
    clrscr();
    student S;
    S.read();
    S.print();
    getch();
}


OUTPUT:

Enter Roll Number & Name Of The Student:
25
Amrita

Roll Number & Name Of The Student:
25
Amrita


C++ Program To Calculate Net salary.

This is a sample C++ Program to calculate net salary. Calculate net salary on the basis of basic salary (HRA & DA).

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

class Emp
{
    char na[10];
    int code, basic;

    public:

      void read()
        {
            cout<<"Enter Name, Code & Basic Salary:";
            gets (na);
            cin>>code>>basic;
        }

      float cal()
        {
            float net;
            float da,hra;
            hra=basic*0.5;
            da=basic*0.4;
            net=basic+hra+da;
            return(net);
        }

      void print()
        {
            cout<<'\n'<<"Details Of Employee:"<<'\n';
            cout<<"********************"<<'\n';
            cout<<"Code: "<<code<<'\n';
            cout<<"Name:"<<na<<'\n';
            …

C++ Program Using Encapsulation-Display Book Details & Compute Costs.

This is a sample program on encapsulation, Using encapsulation here we display the details of a book and compute costs.

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

class book
{
    int bookno;
    float price;
    char booktitle[100];

    float total_cost(int n)
      {
         return (price*n);
      }

  public:

    void input()
      {
         cout<<"Enter Book Number, Price & Name Of Book";
         cin>>bookno>>price>>booktitle;
      }

    void purchase()
      {
         int n;
         cout<<"Enter Number Of Copies:";
         cin>>n;
         cout<<"Total Cost:"<<total_cost(n);

      }
};

void main()
{
    clrscr();
    book B;
    B.input();
    B.purchase();
    getch();
}

OUTPUT:

Enter Book Number, Price & Name Of Book
15422
50
Two States

Enter Number Of Copies: 2
Total Cost: 100



C++ Program To Output Details Of A Box Using Classes.

This is a sample program to output details of a box using classes.

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

class box
{
   private:
       int code;
       char mat[10];
       char col[10];
       float price;

   public:
       void read();
       void print();
};

void box::read()
{
    cout<<"Enter Code, Material, Colour & Price";
    cin>>code;
    gets(mat);
    gets(col);
    cin>>price;
}

void box::print()
{
    cout<<"Code Of Box Is "<<code<<'\n'<<"Colour Is "<<col<<'\n'<<"Material Is "<<mat<<'\n'<<"Price Is "<<price;
}

void main()
{
    clrscr();
    box b;
    b.read();
    b.print();
    getch();
}


OUTPUT:

Enter Code, Material, Colour & Price
1128
Cloth
Blue
35

Code Of Box Is 1128
Colour Is Blue
Material Is Cloth
Price Is 35



C++ Program Using Encapsulation-To Find Area & Volume Of A Cube.

This is a sample program on encapsulation. Using encapsulation, here we find the characteristics of a cube.


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

class Cube
{
  int side;
  int area, volume;
  public:

    void read()
      {
         cout<<"Enter The Side Of Cube:";
         cin>>side;
      }

    void print()
      {
         cout<<"*********Characteristics Of Cube*********"<<'\n';
         cout<<"Area: "<<6*side*side<<'\n';
         cout<<"Volume: "<<side*side*side;
      }
};

void main()
{
   Cube C;
   C.read();
   C.print();
   getch();
}


OUTPUT:

Enter The Side Of Cube:9

*********Characteristics Of Cube*********

Area: 486

Volume: 729


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
{
  private:
  int personid, age;
  char name[25];

  public:
  void read1()
   {
     cout<<"Enter the name, id and age of the person";
     gets (name);
     cin>>personid;
     cin>>age;
   }

 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
{
  private:
  int hno;
  char hname[25], sname[25], po[10];

  public:
  void read2()
   {
     read1();
     cout<<"En…

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?

Advantages
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…