Friday, September 7, 2012

Self Introduction is Your Key to Interview Success


Once you have been invited to an interview you must get ready to create the image of someone they will surely want to hire above all other job applicants. Everybody has an opinion as to how you do that, but what do you actually do and what do you say? Self-introduction is your key to interview success because you are starting from a baseline position where they have no experience of who you are or what you are like.
Yes, they should have read your resume and cover letter you sent in, but that only gave them enough for them to want to see you in person. Now you are going to meet the hiring manager in person, you have a one-off make or break opportunity to get them to see you as the only person they want to employ.
As you know, interviewers will often rely heavily on their first impressions, to the extent that the interview becomes merely a confirmation of that first impression, either good or bad. So if self-introduction is your key to interview success, the first and most important aim is to create a positive first impression. Everybody has an opinion as to how you do that: look ‘em in the eye, give ‘em a firm handshake, speak up and don’t mumble; know your stuff. All good ideas, but what do you actually do and what do you say?
Create A Favorable First Impression
The way to create a favorable first impression is to be sure you appear confident and open. When you meet your interviewer for the first time, make eye-contact at the introduction and repeat the interviewer’s name as you shake hands and thank them for inviting you to the interview. As you get seated, smile to indicate you are ready to get down to business.
What often follows is the invitation to ‘tell them about yourself’ which allows you to commence your self-introduction that is so important to your interview success. This is the phase where you develop the rapport that will carry you through to the positive outcome at the end of the interview.
Because self-introduction is your key to interview success, you must have previously prepared exactly what you are going to say. This is not some lengthy story about your life, but a short focused statement that sounds interesting to the listener. You make it interesting by keeping it short (less than 3 minutes) and by showing that you are interested in both the job and the organization. This means you need to do some research about the business beforehand.
Strengths And Achievements
In your self-introduction you will include some examples of your strengths and achievements which relate directly to the requirements of the new job. This must also demonstrate your personal qualities that you apply when you are doing the job because the type of person you are is often far more important then just having the ability to do a job.
The way you outline your self-introduction, in particular the way you speak, tells the interviewer whether you are confident in your abilities so you must rehearse it well, but don’t try to be what you are clearly not – you’ll only be found out at a later date. Get a friend to listen to your self-introduction with a critical ear, because if it sounds false it will set the alarm bells ringing with the interviewer who will detect that it is not the real you and destroy the rapport you were building up. Practice speaking faster or more slowly, louder or quietly and try to vary it throughout.
When you have prepared your self-introduction, ask yourself this question: ‘What does the interviewer need?’
The answer is that the interviewer needs to identify the best candidate to hire, whilst keeping the costs to a minimum and the fewer people interviewed the better. The need is also for the person who appears to be the best ‘fit’ in terms of both personality and technical ability. Also remember that they may need to justify their decision to hire you, to someone higher!Prepared well, this self-introduction is your key to interview success because it helps to create that all-important first impression, helps you to build the rapport with the interviewer and satisfies the questions about whether you are the sort of person who will fit in to the organization successfully.




Wednesday, August 8, 2012

Sorting Different Techniques in C


For JAVA Tutorials Switch on to http://myjavaquestionbank.blogspot.in


Source code of simple quick sort implementation using array ascending order in c programming language

#include

void quicksort(int [10],int,int);

int main(){
  int x[20],size,i;

  printf("Enter size of the array: ");
  scanf("%d",&size);

  printf("Enter %d elements: ",size);
  for(i=0;i
    scanf("%d",&x[i]);

  quicksort(x,0,size-1);

  printf("Sorted elements: ");
  for(i=0;i
    printf(" %d",x[i]);

  return 0;
}

void quicksort(int x[10],int first,int last){
    int pivot,j,temp,i;

     if(first
         pivot=first;
         i=first;
         j=last;

         while(i
             while(x[i]<=x[pivot]&&i
                 i++;
             while(x[j]>x[pivot])
                 j--;
             if(i
                 temp=x[i];
                  x[i]=x[j];
                  x[j]=temp;
             }
         }

         temp=x[pivot];
         x[pivot]=x[j];
         x[j]=temp;
         quicksort(x,first,j-1);
         quicksort(x,j+1,last);

    }
}

Output:
Enter size of the array: 5
Enter 5 elements: 3 8 0 1 2
Sorted elements: 0 1 2 3 8


Source code of simple bubble sort implementation using array ascending order in c programming language

#include
int main(){

  int s,temp,i,j,a[20];

  printf("Enter total numbers of elements: ");
  scanf("%d",&s);

  printf("Enter %d elements: ",s);
  for(i=0;i
      scanf("%d",&a[i]);

  //Bubble sorting algorithm
  for(i=s-2;i>=0;i--){
      for(j=0;j<=i;j++){
           if(a[j]>a[j+1]){
               temp=a[j];
              a[j]=a[j+1];
              a[j+1]=temp;
           }
      }
  }

  printf("After sorting: ");
  for(i=0;i
      printf(" %d",a[i]);

  return 0;
}


Output:
Enter total numbers of elements: 5
Enter 5 elements: 6 2 0 11 9
After sorting:  0 2 6 9 11


Source code of simple insertion sort implementation using array in ascending order in c programming language

#include
int main(){

  int i,j,s,temp,a[20];

  printf("Enter total elements: ");
  scanf("%d",&s);

  printf("Enter %d elements: ",s);
  for(i=0;i
      scanf("%d",&a[i]);

  for(i=1;i
      temp=a[i];
      j=i-1;
      while((temp=0)){
      a[j+1]=a[j];
          j=j-1;
      }
      a[j+1]=temp;
  }

  printf("After sorting: ");
  for(i=0;i
      printf(" %d",a[i]);

  return 0;
}

Output:
Enter total elements: 5
Enter 5 elements: 3 7 9 0 2
After sorting:  0 2 3 7 9


Source code of simple Selection sort implementation using array ascending order in c programming language

#include
int main(){

  int s,i,j,temp,a[20];

  printf("Enter total elements: ");
  scanf("%d",&s);

  printf("Enter %d elements: ",s);
  for(i=0;i
      scanf("%d",&a[i]);

  for(i=0;i
      for(j=i+1;j
           if(a[i]>a[j]){
               temp=a[i];
              a[i]=a[j];
              a[j]=temp;
           }
      }
  }

  printf("After sorting is: ");
  for(i=0;i
      printf(" %d",a[i]);

  return 0;
}

Output:
Enter total elements: 5
Enter 5 elements: 4 5 0 21 7
The array after sorting is:  0 4 5 7 21


Source code of simple merge sort implementation using array in ascending order in c programming language

#include
#define MAX 50

void mergeSort(int arr[],int low,int mid,int high);
void partition(int arr[],int low,int high);

int main(){
   
    int merge[MAX],i,n;

    printf("Enter the total number of elements: ");
    scanf("%d",&n);

    printf("Enter the elements which to be sort: ");
    for(i=0;i
         scanf("%d",&merge[i]);
    }

    partition(merge,0,n-1);

    printf("After merge sorting elements are: ");
    for(i=0;i
         printf("%d ",merge[i]);
    }

   return 0;
}

void partition(int arr[],int low,int high){

    int mid;

    if(low
         mid=(low+high)/2;
         partition(arr,low,mid);
         partition(arr,mid+1,high);
         mergeSort(arr,low,mid,high);
    }
}

void mergeSort(int arr[],int low,int mid,int high){

    int i,m,k,l,temp[MAX];

    l=low;
    i=low;
    m=mid+1;

    while((l<=mid)&&(m<=high)){

         if(arr[l]<=arr[m]){
             temp[i]=arr[l];
             l++;
         }
         else{
             temp[i]=arr[m];
             m++;
         }
         i++;
    }

    if(l>mid){
         for(k=m;k<=high;k++){
             temp[i]=arr[k];
             i++;
         }
    }
    else{
         for(k=l;k<=mid;k++){
             temp[i]=arr[k];
             i++;
         }
    }
   
    for(k=low;k<=high;k++){
         arr[k]=temp[k];
    }
}


Sample output:

Enter the total number of elements: 5
Enter the elements which to be sort: 2 5 0 9 1
After merge sorting elements are: 0 1 2 5 9



Saturday, July 14, 2012

Introduction to 'C' Language

C language is a general purpose and structured programming langauge developed by 'Dennis Ritchie' at AT &T's Bell Laboratories in the 1972s in USA.

It is also called as 'Procedure oriented programming language.                               

C is not specially designed for specific applications areas like COBOL (Common Business-Oriented Language) or FORTRAN (Formula Translation). It is well suited for business and scietific applications. It has some various features like control structures, looping statements, arrays, macros required for these applications.

After a long illness, Dennis Ritchie( September 9, 1941; found dead October 12, 2011), father of Unix and an esteemed computer scientist, died last weekend at the age of 70. 

Ritchie, also known as “dmr”, is best know for creating the C programming language as well as being instrumental in the development of UNIX along with Ken Thompson. Ritchie spent most of his career at Bell Labs, which at the time of his joining in 1967, was one of the largest phone providers in the U.S. and had one of the most well-known research labs in operation. 

Working alongside Thompson (who had written B) at Bell in the late sixties, the two men set out to develop a more efficient operating system for the up-and-coming minicomputer, resulting in the release of Unix (running on a DEC PDP-1) in 1971.

Though Unix was cheap and compatible with just about any machine, allowing users to install a variety of software systems, the OS was written in machine (or assembly) language, meaning that it had a small vocabulary and suffered in relation to memory. 

By 1973, Ritchie and Thompson had rewritten Unix in C, developing its syntax, functionality, and beyond to give the language the ability to program an operating system. The kernel was published in the same year.

Today, C remains the second most popular programming language in the world (or at least the language in which the second most lines of code have been written), and ushered in C++ and Java; while the pair’s work on Unix led to, among other things, Linus Torvalds’ Linux. The work has without a doubt made Ritchie one of the most important, if not under-recognized, engineers of the modern era.

His work, specifically in relation to UNIX, led to him becoming a joint recipient of the Turing Award with Ken Thompson in 1983, as well as a recipient of the National Medal of Technology in 1998 from then-president Bill Clinton.

History of C :


Year of Establishment Language Name Developed By
1960 ALGOL-60 Cambridge University
1963 CPL (Combined Programming Language) Cambridge University
1967 BCPL (Basic Combined Programming Language) Martin Richard at Cambridge University
1970 B Ken Thompson at AT & T's Bell Laboratories.
1972 C Dennis Ritchie at AT & T' Bell Laboratory.

The development of C was a cause of evolution of programming languages like Algol 60, CPL (Combined Programming Langauge), BCPL (Basic Combined Programming Language) and B.

  • Algol-60 : (1963) : ALGOL is an acronym for Algorithmic Language. It was the first structured procedural programming language, developed in the late 1950s and once widely used in Europe. But it was too abstract and too general structured langauage.

  • CPL : (1963) : CPL is an acronym for Combined Programming Language. It was developed at Cambridge University.

  • BCPL : (1967) : BCPL is an acronym for Basic Combined Programming Language. It was developed by Martin Richards at Cambridge University in 1967. BCPL was not so powerful. So, it was failed.

  • B : (1970) : B language was developed by Ken Thompson at AT & T Bell Laboratories in 1970. It was machine dependent. So, it leads to specific problems.

  • C : (1972) : 'C' Programming Langauage was developed by Dennis Ritchie at AT & T Bell Laboratories in 1972. This is general purpose, compiled, structured programming langauage. Dennis Ritchie studied the BCPL, then improved and named it as 'C' which is the second letter of BCPL

The C language has following numorous features as:
  • Portability
  • Flexibility
  • Effectiveness and efficiency
  • Reliability
  • Interactivity

Execution of C Program :

C program executes in following 4 (four steps).
C program execution steps
  1. Creating a program :
  2. An editor like notepad or wordpad is used to create a C program. This file contains a source code which consists of executable code. The file should be saved as '*.c' extension only.

  3. Compiling the program :
  4. The next step is to compile the program. The code is compiled by using compiler. Compiler converts executable code to binary code i.e. object code.

  5. Linking a program to library :
  6. The object code of a program is linked with libraries that are needed for execution of a program. The linker is used to link the program with libraries. It creates a file with '*.exe' extension.

  7. Execution of program :
  8. The final executable file is then run by dos command prompt or by any other software.

Friday, June 22, 2012

Data Type Tutorials

For java Tutorial log on to myjavaquestionbank.blogspot.in                                  Introducing C data type

Every programming language deals with some data. For example to print any message it requires charterer or string type of data. To solve any mathematic expression it requires integral as well as real number (floating type) of data. C is very rich in data type. We can broadly divide all data type in c in three categories:

1. Primitive or fundamental data type
2. Derived data type
3. User defined data type

List of data type in c


A complete picture of all c data types has been represented by following figure.
Note: Apart from these basic data type there are few other data types which have been defined inside header files which will be discussed later. 

C data type modifiers

There are some keywords in c which modify the meaning the meaning of above mentioned basic data type in c. On the basis of properties of modifier we can categories the modifier in following eight groups.

1. Size modifier
2. Signed modifier
3. Constant modifier
4. Volatile modifier
5. Storage class
6. Pointer modifier
7. Function modifier
8. Interrupt
All modifiers in c have been represented by following table:

In the above table modifier ending with * indicates they are not keyword of c language. These modifiers are called as nothing modifier since there is not any special keyword in which represents those modifiers. If you will not write any thing it then compiler will understand you are writing nothing modifier of those groups.
Meaning of following word in the above table:
nothing: It is not short as well as not long.
not_const:  It is not constant. You can modify.
Not_volatile: It is not volatile.
not_interrupt: It is not sending interrupt signal.
Important points:
1. Nothing modifier must be default modifier of that group.
2. In LINUX GCC compiler there is not any concept of pointer modifier.

Default modifier in c

    If you will not write any modifiers of a particular group then c compiler will take default modifier of that group. Default modifier of each group has written in the following table:
 
1. Default modifier of storage class is auto when we declared the variable inside any function and default modifier of storage class is static when we declared variable outside of all functions. In other word we can say if variable has declared locally then default storage class is auto and if it has declared globally then default storage class of variable is extern.

2. Default storage class of function is extern.

3. Default modifier of pointer modifier depends upon memory model. For detail knowledge click following link:
WHAT IS MEMORY MODEL IN C?

Modifiers in c


Explanation of modifiers in c programming language by examples and questions
Rules for using modifier in c
Rule 1: We cannot use two modifiers of same groups in any particular data type of c.
For example, following declaration of c are illegal:
short long int i;
static auto char c;
signed unsigned int array[5];
pascal cdecl display();
Following are valid declaration of c:
const volatile float f;
signed static long volatile int i;
Question: Is following declaration is valid in c?
1.   intnear * far * huge *p;
2.  char const * const *c;
3.  short short int i;
4.  const const int i;
Rule 2: We can write modifier either before the data type or after the data type. For example, both of following declaration is correct:
unsigned char c;
char unsigned c;
Rule 3: Order of modifier including data type doesn’t affect the meaning of declaration. For example all of the following have same meaning:
int const short extern i;
int extern const short i;
int short extern const i;
const int short extern i;
extern short const int i;
Rule 4: There is one exception in rule 3. POINTER, FUNCTION and INTERRUPT modifier must be written after the data type. For example, in the following declaration:
unsigned const char far *c;
char unsigned const *c;
char far unsigned const *c;
const char far unsigned *c;
far char const unsigned *c;
const unsigned far char *c;
First four declarations are valid as well as equivalent. But last two declarations are invalid.

Range of data types in c

Following table illustrate the range or maximum or minimum value of data types in TURBO C++ and Borland c++ compilers.  
 


Note: In the above table range of float, double and long double has written only for positive numbers. But this range is also true for negative numbers i.e. for range of float is -3.4*10^38 to -3.4*10^ (-38) and so on.
 
Interview Question: Why range of signed char is -128 to 127 not -127 to 128?

const modifier in c

Explanation of const modifier in c programming language by examples, questions and answers:

In c all variables are by default not constant. Hence, you can modify the value of variable by program. You can convert any variable as a constant variable by using modifier const which is keyword of c language.
Properties of constant variable:
1. You can assign the value to the constant variables only at the time of declaration. For example:
const int i=10;
float const f=0.0f;
unsigned const long double ld=3.14L;
2. Uninitialized constant variable is not cause of any compilation error. But you cannot assign any value after the declaration. For example:
const int i;
If you have declared the uninitialized variable globally then default initial value will be zero in case of integral data type and null in case of non-integral data type. If you have declared the uninitialized const variable locally then default initial value will be garbage.
3. Constant variables executes faster than not constant variables.
4. You can modify constant variable with the help of pointers. For example:
#include
int main(){
    int i=10;
    int *ptr=&i;
    *ptr=(int *)20;
    printf("%d",i);
    return 0;
}
Output: 20