Monday 27 August 2012

sample c program to practice before tech interview

 These are the collection of c programs that one must practice before going to technical interview......

1. Program to calculate the factorial of a number
2. Program to calculate the sum digits of a number
3. Program to reverse a number
4. Program to check the number is strong number or not.
5. Program to calculate the prime factors of a numbers
6. Program to check given number is Armstrong or not
7. Program to check given number is palindrome or not
8. Program to add between any two numbers using loop
9. Program to calculate daily expenditure if monthly expenditure is given using loop.
10. Program to count number of bits are set to 1 in an integer.
11. Program to calculate G.C.D of any two numbers
12. Program to calculate L.C.M of two numbers.
13. Program to calculate Fibonacci series
14. Program to calculate string palindrome
15. Program to check the number is Prime number or not
16. Program to find largest number in an array
17. Program to find Second largest number in an array
18. Program to remove duplicate elements in an array
19. Program to convert decimal to binary
20. Program to convert binary to decimal
21. Program to check the number is perfect number or not.
22. Program to find generic root of a number.
23. Program to check a year is leap year or not.
24. Program to reverse a string
25. Program to add a sub-string in a string
26. Program to traverse a string in reverse order
27. Program to count number of vowels , digits,characters and word present in string.
28. Program to add between two matrix
29. Program to multiplication between two matrix
30. Program to transpose a matrix
31. Program to check a matrix is sparse matrix or not
32. Program to calculate Amicable pairs from 1 to 1000
33. Program to calculate Sum of the series 1+2+3+---------+n
34. Program to find area triangle
35. Program for Bubble sort
36. Program for Selection sort
37. Program for insertion sort
38. Program for Quick Sort
39. Program for Merge Sort
40. Program for Sequential search using array
41. Program for Sequential search using linked list
42. Program for Binary search using array
43. Program for Binary search using linked list
44. Program to implement stack using linked list
45. Program to convert infix to prefix notation
46. Program to Evaluate postfix notation
47. Program to implement Queue using linked list
48. Program for Dqueue
49. Program for Priority Queue
50. Program to traverse linked list in reverse order.
51. Program to display the contents of a file using command line argument
52. Calculate the age of a person after giving the date of birth
53. Calculate the average marks of student looking at the following table
54. Calculate the amount to be paid after giving the total time.
55. Program to convert upper case to lower case
56. Program to calculate the power of a number
57. INSERT AN ELEMENT IN AN ARRAY AT DESIRED POSITION
58. program to calculate the sum of the following series
1 - x + x2/2! + x3/3! --------to nth term
59. find the weekday of a particular date(ex-6 sep 2010 (Monday)
60.Write a program to convert given ip address 192.168.3.35 into 192.168.003.035
61.Calculate the net salary looking at the following table
62. Write a program to display : 
*
***
*****
*******
*********
******
***
*
63. Write a program which will store roll name and age in student structure and address telephone no. In address structure. Implement the nested structure which will store information of ten students and their address and organize data in descending order by their roll no.
64. Write a program to store the information of student such as roll, name and course to a file using read & write system call.
65. Program for DFS
66. Program for BFS
67. Program to search an element using hash table
68. Program to search a string from hast table
69. Program to search an element using hash table using chaining
70. Shortest path using warshal's algorithm
71. Shortest path using Dijkstra's algorithm
72. Find the path matrix of Graph
73. Program to read the current date and time
74. Program to read all files from current directory

1. Program to calculate the factorial of a number

main()
{
int x,n;
printf("Enter a number :");
scanf("%d",&n);
x=fact(n);
printf("%d",x);
}
int fact(int n)
{
int f=1;
while(n>0)
{
f=f*n;
n--;
}
return f;
}

2. Program to calculate the sum digits of a number

main()
{
int x,n;
printf("Enter a number :");
scanf("%d",&n);
x=sum_digit(n);
printf("%d",x);
}
int sum_digit(int n)
{
int s=0;
while(n>0)
{
s=s + n%10;
n=n/10;
}
return s;
}

3. Program to reverse a number

main()
{
int x,n;
printf("Enter a number :");
scanf("%d",&n);
x=reverse(n);
printf("%d",x);
}
int reverse(int n)
{
int s=0;
while(n>0)
{
s=s *10 + n%10;
n=n/10;
}
return s;
}

4. Program to check the number is strong number or not.

main()
{
int x,n;
printf("Enter a number :");
scanf("%d",&n);
x=strong(n);
if(x==n)
printf("Strong");
else
printf("Not strong");
}
int strong(int n)
{
int s=0,r,f;
while(n>0)
{
r=n%10;
f=fact(r);
s=s+f;
n=n/10;
}
return s;
}
int fact(int n)
{
int f=1;
while(n>0)
{
f=f*n;
n--;
}
return f;
}
5. Program to calculate the prime factors of a numbers
main()
{
int x,n;
printf("Enter a number :");
scanf("%d",&n);
prime_factors(n);
}
int prime_factors(int n)
{
int i=1,k;
while(i<=n)
{
if(n%i==0)
{
k=check_prime(i);
if(k!=0)
printf("%d ",k);
}
i++;
}
}
int check_prime(int n)
{
int i=1;
int c=0;
while(i<=n)
{
if(n%i==0)
c++;
i++;
}
if(c==2)
return n;
else
return 0;
}

6. Program to check given number is Armstrong or not

main()
{
int n,x;
printf("Enter a number:");
scanf("%d",&n);
x=armstrong(n);
if(x==n)
printf("Arm strong");
else
printf("Not arm strong");
}
int armstrong(int num)
{
int sum=0,r;
while(num!=0)
{
r=num%10;
num=num/10;
sum=sum+(r*r*r);
}
return sum;
}

7. Program to check given number is palindrome or not

main()
{
int n,x;
printf("Enter a number:");
scanf("%d",&n);
x=palendrome(n);
if(x==n)
printf("Palendrome ");
else
printf("Not palendrome ");
}
int palendrome(int num)
{
int r=0;
while(num>0)
{
r=r* 10 + num%10;
num=num/10;
}
return r;
}

8. Program to add between any two numbers using loop

main()
{
int x;
int a,b;
printf("Enter any two numbers :");
scanf("%d%d",&a,&b);
x=add(a,b);
printf("%d ",x);
}
int add(int a,int b)
{
while(a>0)
{
b++;
a--;
}
return b;
}

9. Program to calculate daily expenditure if monthly expenditure is given using loop.

main()
{
int x,n;
printf("Enter monthely expenditure :");
scanf("%d",&n);
x=daily_exp(n);
printf("%d ",x);
}
int daily_exp(int n)
{
int c=0;
while(n>0)
{
c++;
n=n-30;
}
return c;

}

10. Program to count number of bits are set to 1 in an integer.

main()
{
int x,n;
printf("Enter a number :");
scanf("%d",&n);
x=bit_count(n);
printf("%d ",x);
}
int bit_count(int n)
{
int c=0;
while(n>0)
{
c++;
n=n&n-1;
}
return c;
}

11. Program to calculate G.C.D of any two numbers

main()
{
int n1,n2,x;
printf("Enter two numbers:");
scanf("%d%d",&n1,&n2);
x=gcd(n1,n2);
printf("%d ",x);
}
int gcd(int n1,int n2)
{
while(n1!=n2)
{
if(n1>n2)
n1=n1-n2;
else
n2=n2-n1;
}
return n1;
}

12. Program to calculate L.C.M of two numbers.

main()
{
int n1,n2,x;
printf("Enter two numbers:");
scanf("%d%d",&n1,&n2);
x=lcm(n1,n2);
printf("%d ",x);
}
int lcm(int n1,int n2)
{
int x,y;
x=n1,y=n2;
while(n1!=n2)
{
if(n1>n2)
n1=n1-n2;
else
n2=n2-n1;
}
return x*y/n1;
}

13. Program to calculate Fibonacci series

main()
{
int n;
printf("Enter the number range:");
scanf("%d",&n);
fibo(n);
}
int fibo(int n)
{
int i=0,j=1,k=2,r,f;
printf("%d %d ", i,j);
while(k<n)
{
f=i+j;
i=j;
j=f;
printf(" %d",j);
k++;
}
}

14. Program to calculate string palindrome

main()
{
char x[100],y[100];
printf("Enter a string :");
scanf("%s",x);
strcpy(y,x);
check_palindrome(x);
if(strcmp(x,y)==0)
printf("Palindrome");
else
printf("Not Palindrome");
}
int check_palindrome(char *x)
{
int len=strlen(x);
int i;
char temp;
for(i=0;i<len/2;i++)
{
temp=x[i];
x[i]=x[len-i-1];
x[len-i-1]=temp;
}
}

15. Program to check the number is Prime number or not

main()
{
int n,k;
printf("Enter a number:");
scanf("%d",&n);
k=check_prime(n);
if(k==2)
printf("Prime");
else
printf("Not prime");
}
int check_prime(int n)
{
int i=1,c=0;
while(i<=n)
{
if(n%i==0)
c++;
i++;
}
return c;
}

16. Program to find largest number in an array

main()
{
int a[]={15,67,25,90,40};
int k;
k=large_number(a);
printf("%d ",k);
}
int large_number(int a[5])
{
int i,big;
big=a[0];
for(i=1;i<5;i++)
{
if(big<a[i])
big=a[i];
}
return big;
}

17. Program to find Second largest number in an array

main()
{
int a[]={15,67,25,90,40};
int k;
k=large_number(a);
printf("%d ",k);
}
int large_number(int un[5])
{
int big1,big2;
int i;
big1 = un[0];
for ( i=1;i<5;++i )
if ( big1 < un[i] )
big1 = un[i];
if ( big1!=un[0] )
big2=un[0];
else
big2=un[1];
for(i=1; i<5;++i )
if (big1!=un[i] && big2 < un[i] )
big2=un[i];
return big2;
}

18. Program to remove duplicate elements in an array

main()
{
int i,k;
int x[10]={5,7,2,8,9,3,3,6,7,20};
k=remove_duplicate(x);
for(i=0;i<k;i++)
{
printf(" %d",x[i]);
}
}
int remove_duplicate(int p[10])
{
int size=10,i,j,k;
for(i=0;i<size;i++)
{
for(j=0;j<size;j++)
{
if(i==j)
{
continue;
}
else
if(*(p+i)==*(p+j))
{
k=j;
size--;
while(k < size)
{
*(p+k)=*(p+k+1);
k++;
}
j=0;
}
}
}
return size;
}

19. Program to convert from decimal to binary

main()
{
int n;
printf("Enter a number :");
scanf("%d",&n);
decimal_binary(n);
}
int decimal_binary(int n)
{
int m,no=0,a=1,rem;
m=n;
while(n!=0)
{
rem=n%2;
no=no+rem*a;
n=n/2;
a=a*10;
}
printf("%d",no);
}

20. Program to convert binary to decimal

main()
{
int n;
printf("Enter data in binary format :");
scanf("%d",&n);
binary_decimal(n);
}
int binary_decimal(int n)
{
int j=1,rem,n1=0;
while(n!=0)
{
rem=n%10;
n1=n1+rem*j;
j=j*2;
n=n/10;
}
printf("%d",n1);
}

21. Program to check the number is perfect number or not.

main()
{
int n,x;
printf("Enter a number:");
scanf("%d",&n);
x=check_perfect(n);
if(x==n)
printf("Perfect number :");
else
printf("Not a perfect number :");
}
int check_perfect(int n)
{
int s=0,i=1;
while(i<n)
{
if(n%i==0)
s=s+i;
i++;
}
return s;
}

22.Program to find generic root of a number.

main()
{
int n,k;
printf("Enter a number");
scanf("%d",&n);
k=generic(n);
printf("%d",k);
}
int generic(int n)
{
int sum,r;
if(n<10)
return n;
while(n>10)
{
sum=0;
while(n!=0)
{
r=n%10;
n=n/10;
sum+=r;
}
if(sum>10)
n=sum;
else
break;
}
return sum;
}

23. Program to check a year is leap year or not.

main()
{
int year;
printf("Enter the year :\n");
scanf("%d",&year);
if((year % 400==0 )|| ((year % 4==0)&& (year %100!=0)))
printf("Leap Year ");
else
printf("Not leap year");
}

24. Program to reverse a string

main()
{
char x[100];
printf("Enter a string :");
gets(x);
strrev(x);
printf("%s",x);
}
int strrev(char *x)
{
int len=strlen(x);
int i;
char temp;
for(i=0;i<len/2;i++)
{
temp=x[i];
x[i]=x[len-i-1];
x[len-i-1]=temp;
}
}

25. Program to add a sub-string in a string

main()
{
char x[100],y[20];
int pos;
printf("Enter string :");
gets(x);
printf("Enter substring:");
scanf("%s",y);
printf("Enter position:");
scanf("%d",&pos);
add_substring(x,y,pos);
}
int add_substring(char *x,char *y,int pos)
{
char z[100];
int i=0,j=0,k;
memset(z,0,sizeof(z));
while(i<pos)
{
z[i]=*x;
x++;
i++;
}
while(*y!=0)
{
z[i]=*y;
i++;
y++;
}
z[i]=' ';
i++;
while(*x!=0)
{
z[i]=*x;
i++;
x++;
}
z[i]=0;
printf("%s",z);
}

26. Program to traverse a string in reverse order

main()
{
char x[100];
printf("Enter a string :");
gets(x);
int len=strlen(x)-1;
while(len>=0)
{
printf("%c",x[len]);
len--;
}
}

27. Program to count number of words,vowels,digits and space present in string.

main()
{
int word=0,space=0,digit=0,vowels=0,i;
char x[100];
printf("Enter a string :");
gets(x);
for(i=0;i<strlen(x);i++)
{
if(x[i]=='a' || x[i]=='A' || x[i]=='e' || x[i]=='E' || x[i]=='i' || x[i]=='I'
|| x[i]=='o' || x[i]=='O' || x[i]=='u' || x[i]=='U')
vowels++;
if(x[i]>=48 && x[i]<=57)
digit++;
if(x[i]==32) //space
space++;
}
word=space+1;
printf("%d %d %d %d\n",word,space,digit,vowels);
}

28. Program to add between two matrix

main()
{
int a[3][3]={
1,2,1,
1,2,2,
3,2,1
};
int b[3][3]={
2,2,1,
1,1,1,
2,3,1
};
int c[3][3];
int i,j,k,sum=0;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
c[i][j]=a[i][j]*b[i][j];
}
}
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
printf("%d ",c[i][j]);
}
printf("\n");
}
}

29. Program for multiplication between two matrix

main()
{
int a[3][3]={
1,2,1,
1,2,2,
3,2,1
};
int b[3][3]={
2,2,1,
1,1,1,
2,3,1
};
int c[3][3];
int i,j,k,sum=0;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
c[i][j]=0;
for(k=0;k<3;k++)
{
c[i][j]=c[i][j]+a[i][k]*b[k][j];
}
}
}
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
printf("%d ",c[i][j]);
}
printf("\n");
}
}

30. Program to transpose a matrix

main()
{
int a[3][5]={
1,4,5,6,7,
2,3,4,1,5,
9,5,3,1,4
};
int b[5][3];
int i,j;
for(i=0;i<3;i++)
{
for(j=0;j<5;j++)
{
b[j][i]=a[i][j];
}
}
for(i=0;i<5;i++)
{
for(j=0;j<3;j++)
{
printf("%d",b[i][j]);
}
printf("\n");
}
}

31. Program to check a matrix is sparse matrix or not

main()
{
int mat[3][5]={
1,0,2,3,0,
0,1,0,1,0,
0,0,0,1,0
};
int i,j,nzero=0,zero=0;
for(i=0;i<3;i++)
{
for(j=0;j<5;j++)
{
if(mat[i][j]!=0)
nzero++;
else
zero++;
}
}
if(zero>nzero)
printf("The matrix is sparse matrix");
else
printf("Not a sparse matrix");
}

32. Program to calculate Amicable pairs from 1 to 1000

#include "stdio.h"
main()
{
int n,k;
int i=1,s1=0,s2=0;
for(k=1;k<=1000;k++)
{
n=k;
while(i<n)
{
if(n%i==0)
s1=s1+i;
i++;
}
i=1;
if(s1==n)
continue;
while(i<s1)
{
if(s1%i==0)
s2=s2+i;
i++;
}
if(n==s2)
printf("%d \n",n);
s1=0;
s2=0;
}
}

33. Program to calculate Sum of the series 1+2+3+---------+n

main()
{
int r;
printf("Enter the number range: ");
scanf("%d",&r);
printf("%d",(r*(r+1))/2);
}

34. Program to find area triangle

#include "math.h"
int main()
{
double a,b,c,s;
double area;
printf("Enter the size of triangle :");
scanf("%lf%lf%lf",&a,&b,&c);
s = (a + b + c)/2;
area =sqrt (s*(s-a)*(s-b)*(s-c));
printf("%lf",area);
}

35. Program for Bubble sort

main()
{
int a[5]={4,9,40,2,25};
int i;
bubble_sort(a);
for(i=0;i<5;i++)
printf("%d ",a[i]);
}
int bubble_sort(int a[5])
{
int i,j,temp;
for(i=0;i<5;i++)
{
for(j=0;j<5-i;j++)
{
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
}

36. Program for Selection sort

main()
{
int a[5]={4,9,40,2,25};
int i;
selection_sort(a);
for(i=0;i<5;i++)
printf("%d ",a[i]);
}
int selection_sort(int a[5])
{
int i,j,temp;
for(i=0;i<5;i++)
{
for(j=i+1;j<5;j++)
{
if(a[i]>a[j])
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
}
}

37. Program for Insertion sort

main()
{
int a[5]={4,9,40,2,25};
int i;
insert_sort(a);
for(i=0;i<5;i++)
printf("%d ",a[i]);
}
int insert_sort(int a[5])
{
int i,j,k,temp;
for(i=1;i<5;i++)
{
for(j=0;j<i;j++)
{
if(a[i]<a[j])
{
temp=a[i];
for(k=i;k>j;k--)
{
a[k]=a[k-1];
}
a[j]=temp;
}
}
}
}

38. Program for quick sort

main()
{
int x[5]={5,9,2,20,6};
int i;
quick_sort(x,0,4);
for(i=0;i<5;i++)
printf("%d ",x[i]);
}
quick_sort(int x[10],int first,int last)
{
int pivot,j,temp,i;
if(first<last)
{
pivot=first;
i=first;
j=last;
while(i<j)
{
while(x[i]<=x[pivot]&&i<last)
i++;
while(x[j]>x[pivot])
j--;
if(i<j)
{
temp=x[i];
x[i]=x[j];
x[j]=temp;
}
}
temp=x[pivot];
x[pivot]=x[j];
x[j]=temp;
quick_sort(x,first,j-1);
quick_sort(x,j+1,last);
}
}

39. Program for Merge Sort

40. Program for sequential search

main()
{
int a[]={6,5,3,20,55};
int i,flag=0,n;
printf("Enter number to search :");
scanf("%d",&n);
for(i=0;i<5;i++)
{
if(a[i]==n)
{
flag=1;
break;
}
}
if(flag==1)
printf("Found\n");
else
printf("Not found\n");
}

41. Program for Sequential search using linked list

struct xxx
{
int data;
struct xxx *ad;
};
struct xxx *create_linkedlist();
main()
{
int k;
struct xxx *b;
b=create_linkedlist();
k=search(b);
if(k==1)
printf("Found ");
else
printf("Not found\n");
}
struct xxx *create_linkedlist()
{
char ch[10];
struct xxx *p,*q,*r;
p=malloc(sizeof(struct xxx));
printf("Enter data :");
scanf("%d",&p->data);
r=p;
while(1)
{
printf("Do u continue yes/no :");
scanf("%s",ch);
if(strcmp(ch,"no")==0)
break;
q=malloc(sizeof(struct xxx));
p->ad=q;
p=q;
printf("Enter data :");
scanf("%d",&p->data);
}
p->ad=0;
return r;
}
int search(struct xxx *p)
{
int n,flag=0;
printf("Enter number to search :");
scanf("%d",&n);
while(p!=0)
{
if(p->data==n)
{
flag=1;
break;
}
p=p->ad;
}
return flag;
}


42. Binary Search using an Array

void main()
{
int a[10],i,n,m,c=0,l,u,mid;
printf("Enter the size of an array->");
scanf("%d",&n);
printf("\nEnter the elements of the array->");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
printf("\nThe elements of an array are->");
for(i=0;i<n;i++)
{
printf(" %d",a[i]);
}
printf("\nEnter the number to be search->");
scanf("%d",&m);
l=0,u=n-1;
while(l<=u)
{
mid=(l+u)/2;
if(m==a[mid])
{
c=1;
break;
}
else
if(m<a[mid])
{
u=mid-1;
}
else
l=mid+1;
}
if(c==0)
printf("\nThe number is not in the list");
else
printf("\nThe number is found");
}

43. Program for Binary search using linked list

struct xxx
{
int roll;
struct xxx *ad;
};
struct xxx *create();
main()
{
int status;
int u,n;
struct xxx *b;
b=create();
visit(b);
selection_sort(b);
printf("\n");
visit(b);
u=count(b);
printf("Enter number to search :");
scanf("%d",&n);
status=binary_search(b,1,u,n);
if(status==1)
printf("Found\n");
else
printf("Not found\n");
}
int binary_search(struct xxx *p,int l,int u,int n)
{
struct xxx *r=p;
int mid,i,f=0;
while(l<=u && r!=0)
{
mid=(l+u)/2;
for(i=1;i<mid;i++)
{
r=r->ad;
}
if(n==r->roll)
{
f=1;
break;
}
if(n<r->roll)
{ u=mid-1;
}
if(n>r->roll)
{
l=mid+1;
}
r=p;
}
return f;
}
int count(struct xxx *p)
{
int c=0;
while(p!=0)
{
c++;
p=p->ad;
}
return c;
}
int selection_sort(struct xxx *p)
{
struct xxx *q=p->ad;
int temp;
while(p->ad!=0)
{
while(q!=0)
{
if(p->roll>q->roll)
{
temp=p->roll;
p->roll=q->roll;
q->roll=temp;
}
q=q->ad;
}
p=p->ad;
q=p->ad;
}
}
int visit(struct xxx *p)
{
while(p!=0)
{
printf("%d ",p->roll);
p=p->ad;
}
}
struct xxx *create()
{
struct xxx *p,*q,*r;
char ch[10];
p=malloc(sizeof(struct xxx));
r=p;
while(1)
{
printf("Enter roll :");
scanf("%d",&p->roll);
printf("Do u continue yes/No:");
scanf("%s",ch);
if(strcmp(ch,"no")==0)
break;
q=malloc(sizeof(struct xxx));
p->ad=q;
p=q;
}
p->ad=0;
return r;
}

44. Program to implement stack using linked list

struct xxx
{
int roll;
struct xxx *ad;
};
struct xxx *p=0;
main()
{
int x;
do
{
printf("1 for push\n");
printf("2 for pop\n");
printf("0 for stop\n");
printf("Enter choice :");
scanf("%d",&x);
if(x==1)
{
push();
}
else
if(x==2)
{
pop();
}
}while(x!=0);
}
int pop()
{
if(p==0)
{
printf("Stack is empty\n");
return;
}
else
{
printf("%d \n",p->roll);
p=p->ad;
}
}
int push()
{
struct xxx *q;
if(p==0)
{
p=malloc(sizeof(struct xxx));
printf("Enter roll :");
scanf("%d",&p->roll);
p->ad=0;
}
else
{
q=malloc(sizeof(struct xxx));
q->ad=p;
p=q;
printf("Enter roll :");
scanf("%d",&p->roll);
}
}

45. Program to convert infix to prefix notation

struct xxx
{
char data;
struct xxx *ad;
};
main()
{
int len;
struct xxx *opd=0,*opr=0,*q;
char x[50];
char y[50];
int i=0;
printf("Enter Infix expression :");
scanf("%s",x);
char *p=x+strlen(x)-1;
int k1,k2;
for(i=strlen(x)-1;i>=0;i--)
{
if(*p>=48 && *p<=57)
{
if(opd==0)
{
opd=malloc(sizeof(struct xxx));
opd->data=*p;
opd->ad=0;
}
else
{
q=malloc(sizeof(struct xxx));
q->ad=opd;
opd=q;
opd->data=*p;
}
}
else
{
if(opr==0)
{
opr=malloc(sizeof(struct xxx));
opr->data=*p;
opr->ad=0;
}
else
{
k1=check_precedence(*p);
k2=check_precedence(opr->data);
if(k1<=k2)
{
while(k1<=k2 && opr!=0)
{
q=malloc(sizeof(struct xxx));
q->ad=opd;
opd=q;
opd->data=opr->data;
opr=opr->ad;
if(opr==0)
{ opr=malloc(sizeof(struct xxx));
opr->ad=0;
break;
}
k2=check_precedence(opr->data);
}
opr->data=*p;
}
else
{
q=malloc(sizeof(struct xxx));
q->ad=opr;
opr=q;
opr->data=*p;
}
}//else
} //else
p--;
} //for
while(opr!=0)
{
q=malloc(sizeof(struct xxx));
q->ad=opd;
opd=q;
opd->data=opr->data;
opr=opr->ad;
}
memset(y,0,sizeof(y));
i=0;
while(opd!=0)
{
y[i]=opd->data;
i++;
opd=opd->ad;
}
printf("%s ",y);
}
int check_precedence(int m)
{
switch(m)
{
case '+':
case '-':
return 1;
case '/':
case '*':
return 2;
}
}

46. Program to Evaluate postfix notation

struct xxx
{
unsigned char data;
struct xxx *ad;
};
main()
{
unsigned char a,b,c;
struct xxx *st=0,*q;
char x[100];
printf("Enter Post Expression:");
scanf("%s",x);
char *p=x;
while(*p!=0)
{
if(*p>=48 && *p<=57)
{
if(st==0)
{
st=malloc(sizeof(struct xxx));
st->data=*p;
st->ad=0;
}
else
{
q=malloc(sizeof(struct xxx));
q->ad=st;
st=q;
st->data=*p;
}
}
else
{
b=st->data-48;
st=st->ad;
a=st->data-48;
if(*p=='*')
{
c=a*b;
}
else
if(*p=='/')
{
c=a/b;
}
else
if(*p=='+')
{
c=a+b;
}
else
if(*p=='-')
{
c=a-b;
}
st->data=c+48;
}
p++;
}
printf("%d ", st->data-48);
}

47. Program to implement Queue using linked list

#include<stdio.h>
#include<malloc.h>
struct node
{
int info;
struct node *next;
} ;
struct node *front, *rear;
void enqueue(int elt);
int dequeue();
void display();
void main()
{
int ch, elt;
rear = NULL;
front = NULL;
while (1)
{
printf("1 Insert\n");
printf("2 Delete\n");
printf("3 Display\n");
printf("4 Exit\n");
printf("Enter your choice : ");
scanf("%d", &ch);
switch (ch)
{
case 1:
printf("Enter The Element Value\n");
scanf("%d", &elt);
enqueue(elt);
break;
case 2:
elt = dequeue();
printf("The deleted element = %d\n", elt);
break;
case 3:
display();
break;
default:
exit(0);
}
}
}
void enqueue(int elt)
{
struct node *p;
p = (struct node*)malloc(sizeof(struct node));
p->info = elt;
p->next = NULL;
if (rear == NULL || front == NULL)
front = p;
else
rear->next = p;
rear = p;
}
int dequeue()
{
struct node *p;
int elt;
if (front == NULL || rear == NULL)
{
printf("\nUnder Flow");
exit(0);
}
else
{
p = front;
elt = p->info;
front = front->next;
free(p);
}
return (elt);
}
void display()
{
struct node *t;
t = front;
while (front == NULL || rear == NULL)
{
printf("\nQueue is empty");
exit(0);
}
while (t != NULL)
{
printf("->%d", t->info);
t = t->next;
}
}
49. Program for Priority Queue
struct xxx
{
int pr;
struct xxx *ad;
};
struct xxx *p=0;
main()
{
int x;
do
{
printf("1 for add\n");
printf("2 for dele\n");
printf("3 for traverse\n");
printf("0 for stop\n");
printf("Enter choice :");
scanf("%d",&x);
if(x==1)
add();
else
if(x==2)
dele();
else
if(x==3)
trav();
}while(x!=0);
}
int trav()
{
struct xxx *r=p;
while(r!=0)
{
printf("%d ",r->pr);
r=r->ad;
}
}
int add()
{
struct xxx *q,*r,*m;
if(p==0)
{
p=malloc(sizeof(struct xxx));
printf("Enter priority :");
scanf("%d",&p->pr);
p->ad=0;
}
else
{
q=malloc(sizeof(struct xxx));
printf("Enter priority :");
scanf("%d",&q->pr);
if(q->pr <= p->pr)
{
q->ad=p;
p=q;
}
else
{
r=p;
while(q->pr > r->pr)
{
m=r;
if(r->ad==0)
{
r->ad=q;
q->ad=0;
return;
}
r=r->ad;
}
m->ad=q;
q->ad=r;
}
}
}
int dele()
{
struct xxx *r,*m;
r=p;
if(r==0)
{
printf("Stack is empty\n");
exit(0);
}
while(r->ad!=0)
{
m=r;
r=r->ad;
}
free(r);
m->ad=0;
}

50. Traverse a linked list in reverse order

#include <stdio.h>
#define NODES 4
typedef struct list_head {
struct node* head;
struct node* tail;
} list_head;
typedef struct node {
struct node* next;
int value;
} node;
node n[NODES];
list_head init_empty_list()
{
list_head h;
h.head = 0;
h.tail = 0;
return h;
}
list_head init_list()
{
int i;
list_head h;
for (i=0; i<NODES-1; ++i) {
n[i].next = &n[i+1];
n[i].value = i+1;
}
n[NODES-1].next = 0;
n[NODES-1].value = NODES;
h.head = &n[0];
h.tail = &n[NODES-1];
return h;
}
void print_list(list_head h)
{
node* p = h.head;
while (p) {
printf("%d ", p->value);
p = p->next;
}
printf("\n");
}
list_head reverse_list(list_head h)
{
list_head nh;
if ((h.head == 0) || (h.head->next ==0)) {
return h;
}
nh.head = h.head->next;
nh.tail = h.tail;
nh = reverse_list(nh);
h.head->next = 0;
nh.tail->next = h.head;
nh.tail = h.head;
return nh;
}
int main()
{
list_head head;
head = init_list();
print_list(head);
head = reverse_list(head);
print_list(head);
return 0;
}

51. Program to display the contents of a file using command line argument

#include "fcntl.h"
main(int x, char *y[], char *z[])
{
int i;
char ch;
if(x<2)
{
printf("Too few parameters\n");
exit(0);
}
for(i=1;i<x;i++)
{
int k=open(y[i],O_RDONLY);
if(k==-1)
{
printf("File not found\n");
break;
}
while(read(k,&ch,1))
printf("%c",ch);
close(k);
}
}

52. Calculate the age of a person after giving the date of the birth.

#include "time.h"
main()
{
char x[100],y[100];
int dd,mm,yy;
int bd,bm,by;
int nd,nm,ny;
unsigned int t;
struct tm *mytime;
t=time(0);
mytime=localtime(&t);
dd=mytime->tm_mday;
mm=mytime->tm_mon+1;
yy=mytime->tm_year+1900;
printf("Enter birtd day,mon and year :");
scanf("%d%d%d",&bd,&bm,&by);
if(dd>=bd)
nd=dd-bd;
else
if(mm==1 || mm==3 || mm==5 || mm==7 || mm==8 || mm==10 || mm==12)
{
dd=dd+31;
nd=dd-bd;
}
else
if(mm==4 || mm==6 || mm==9 || mm==11)
{
dd=dd+30;
nd=dd-bd;
}
else
if(mm==2)
{
dd=dd+28;
nd=dd-bd;
}
if(mm>=bm)
{
nm=mm-bm;
}
else
{
mm=mm+12;
yy=yy-1;
nm=mm-bm;
}
ny=yy-by;
printf("%d %d %d \n",ny,nm,nd);
}

53. Calculate the average marks of student looking at the following table

p1 p2 p3 average Result
>=60% first
>=50 second
>=40 third
avg=(p1+p2+p3)/3;
where p1,p2 and p3 >=30
main()
{
int p1,p2,p3,avg;
printf("Enter Marks for p1 p2 & p3 : ");
scanf("%d%d%d",&p1,&p2,&p3);
avg=(p1+p2+p3)/3;
if(p1>=30 && p2>=30 && p3>=30)
{
if(avg>=60)
printf("First\n");
else
if(avg>=50)
printf("Second\n");
else
if(avg>=40)
printf("Third\n");
else
printf("Failed\n");
}
else
printf("Failed\n");
}

54. Cacluate the amount to be paid after giving the total time.

Time Amount
8 hours 100/-
Next 4 hours 20/- ph
Next 4 hours 30/- ph
Next 4 hours 40/- ph
main()
{
int time,amt;
printf("Enter Total Time :");
scanf("%d",&time);
if(time==8)
amt=100;
else
if(time>8 && time<=12)
amt=100+(time-8)*20;
else
if(time>12 && time<=16)
amt=180+(time-12)*30;
else
if(time>16 && time<=20)
amt=300+(time-16)*40;
else
{
printf("Invalid entry\n");
exit(0);
}
printf("%d", amt);
}

55. Program to convert upper case to lower case

void main()
{
char str[20];
int i;
printf("Enter any string->");
scanf("%s",str);
printf("The string is->%s",str);
for(i=0;i<=strlen(str);i++)
{
if(str[i]>=65&&str[i]<=90)
str[i]=str[i]+32;
}
printf("\nThe string in uppercase is->%s",str);
}

56. Program to calculate the power of a number

void main()
{
int pow,num,i=1;
long int sum=1;
printf("\nEnter a number: ");
scanf("%d",&num);
printf("\nEnter power: ");
scanf("%d",&pow);
while(i<=pow)
{
sum=sum*num;
i++;
}
printf("\n%d to the power %d is: %ld",num,pow,sum);

57. INSERT AN ELEMENT IN AN ARRAY AT DESIRED POSITION

void main()
{
int a[50],size,num,i,pos,temp;
printf("\nEnter size of the array: ");
scanf("%d",&size);
printf("\nEnter %d elements in to the array: ",size);
for(i=0;i<size;i++)
scanf("%d",&a[i]);
printf("\nEnter position and number to insert: ");
scanf("%d %d",&pos,&num);
i=0;
while(i!=pos-1)
i++;
temp=size++;
while(i<temp)
{
a[temp]=a[temp-1];
temp--;
}
a[i]=num;
for(i=0;i<size;i++)
printf(" %d",a[i]);
}
}

58. program to calculate the sum of the following series

1 - x + x2/2! + x3/3! --------to nth term
main()
{
int serise,square,fact=1,loop=1,loop1;
float sum;
float result=0;
printf("Enter The serise ");
scanf("%d",&serise);
while(loop<=serise)
{
square=pow(loop,2);
for(loop1=1;loop1<=loop;loop1++)
{
fact = fact * loop1;
}
sum=(float)square/fact;
if(loop%2!=0)
result = result + sum;
else
result = result - sum;
fact=1;
loop++;
}
printf("The summation Of the serise is %f\n",result);
}

59. Find the weekday of a particular date(ex-6 sep 2010 (monday)

#include "time.h"
#include "stdio.h"
main()
{
char daybuf[20];
int dd,mm,yy;
unsigned int t;
struct tm *mytime;
t=time(0);
mytime=localtime(&t);
dd=mytime->tm_mday;
mm=mytime->tm_mon+1;
yy=mytime->tm_year+1900;
mytime->tm_hour = 0;
mytime->tm_min = 0;
mytime->tm_sec = 1;
mytime->tm_isdst = -1;
printf("Enter the day,mon and year :");
scanf("%d%d%d",&dd,&mm,&yy);
if(mktime(mytime) == -1)
fprintf(stderr, "Unkown -\n");
else
strftime(daybuf, sizeof(daybuf), "%A", mytime);
printf("Itwas a %s\n", daybuf);
}

Sunday 26 August 2012

On the day of interview/during an interview


PRE- REQUISITES

  •  As already said make sure you possess 3-4 copies of your resume ( better have a softcopy as well )
  • Get your marks memos of SSC,INTER and ENGINEERING
  • Certificates of internship/mini project/course etc. if any
  • Make sure you are well dressed to the occasion
  • Most importantly eat properly and come because recruitment process is time taking ( can last up to 6-7 hours )
  • Make necessary travel arrangements

***DURING AN INTERVIEW***

Your chance of getting through the interview would depend on the five factors which I have mentioned above…

GOOD NEWS: If you have sincerely worked on all those factors you have a real good chance of getting through!!!                                                                                                                                         
BAD NEWS: Even after working hard on those five factors and being well prepared if you can’t convey / communicate /project whatever you have prepared,your chance of getting through is pretty less!!!
 
Trust me there are people who prepare real hard for the interview but ultimately fail because of inefficiency in their way of communication. And then there are people who don’t prepare that hard but manage somehow to convey all that is needed and get through. Finally there are people who don’t prepare at all but amazing get through.
 

What is want to say is you getting selected or depends on “HOW WELL CAN YOU CONVINCE THE INTERVIEWEE THAT YOU ARE SUITABLE FOR THE POSITION “
 

HOW TO GET THROUGH THE INTERVIEW THEN???

STEP 1: PREPARE

  • I have already written how to prepare so one needs to do all the above mentioned things as a part of the first step
  • Once you are prepared automatically you will be confident and that will naturally show in your interview (some people even without preparing are bloody confident about themselves and a few as said make it through as well…respect to them...I do not belong to that category )

STEP 2: BE CONFIDENT

ONCE YOU ARE PREPARED, FIRST BELIEVE YOURSELF, HAVE FAITH AND BE VERY CONFIDENT. PREPARATION AND ‘’CONFIDENCE’’ ARE ALL THAT WOULD BE REQUIRED TO CRACK THE PLACEMENT.

STEP 3: TALK

  • There is no easy way of doing this…you will be selected only if you talk. Even if your English is not that good, even if you are scared, even if you give a wrong answer, even if your interviewing is not going well…please don’t let your confidence go down… all these are pretty normal with fresher’s. Speak your heart out, don’t let your preparation go in vain…tell the interviewer what all you planned to tell in the interview ( many a times you miss out so many things which you wanted to tell…don’t worry at all its pretty normal  )
  • Be well versed with your resume because questions would be fired starting from the details which you mention in your resume.
NOTE: I have mentioned a few sample questions (and their answers) asked in interviews…do check them out…read and analyze all the answers then I am sure you can perform very well in the interviews

### Always keep your motive in your head…”convince the interviewer that you are the best person for that position”…give him what he/she wants ###

Saturday 25 August 2012

How to make your resume?

RESUME




                           ‘’ Your resume meets the interviewer before you do!’’

Exactly, even before you meet the interviewer your resume does the talking and makes a huge impact on the whole interview. So, the first and the most important step is to make your own resume. (A pretty rock solid one)

What is a good resume?

  • if you have studied in various places/states it’s considered a big advantage because that would show that you are adaptable to different environs. If that is not the case and all your life has been confined to a single place and then simply avoid mentioning the places in resume.
  • Consistency in your percentage semester wise is very good, gradual increase in percentage semester wise is awesome!!!! If there is fall in percentage like mine then it’s a little bit of trouble but don’t worry at end of this article I have mentioned about how to manage such situation
  • For engineering students SAE, ASME,MSP  are some of the organizations which one should look forward to have association with as it is considered a big advantage. I would recommend other branch students also to join such clubs or organizations.
  • Board in which you have done your schooling also matters. Usually in CBSE/ICSE schools like KENDRIYA VIDYALAYA,DAV,JAWAHAR NAVODAYA,CHRISTIAN MISSIONARY SCHOOLS,HPS,DPS etc( I mean no disrespect to other schools there are hell lot of other good schools these are just a few examples) lot of importance is given to extracurricular activities apart from studies so they would prefer these students.
  • People who play sports have a very good advantage over others especially team games like football, cricket etc and if you are part of the college team or any other club make sure you tell this to the interviewer because it not only shows you are interested in extracurricular activities but also have a real time experience of working in teams and obviously about your physical fitness.
  • Polyglot- one who can speak different languages has an edge over others because he/she can communicate in different languages and has a greater probability of working efficiently in different work places where people from all the states work.
  • If you have done part time or even taken tuition it would automatically show him that you have an individuality of your own and also an urge to survive on your own.
  • One of the most important aspects would be mini project or internship which you are supposed to do in your 3rd or 4th year. A compulsory question would be asked to you regarding the project you have done ( for ex: what is that you have done personally i.e. what is your own contribution to the project and what have you learned  from it??)
  • Hobbies are also very important. Any activity like reading books, photography,painting or gardening can be included in the resume. Unusual hobbies give you a special identity in the interviews and obviously lands your name in the interviewers head. I have a friend who is a guitarist and plays for bands and performs live etc this hobby played a great role in his interview process and ended up with him getting placed in Microsoft with a salary of around 10lpa. 

  • Social service is also considered a very big positive as it shows a sense of responsibility and also willingness to act for the society.
There are many other aspects these are just few of them. If your resume has info related to the above mentioned content then you just have a better chance of getting a job. And
if you don’t then absolutely no need to worry, this are just a few examples for you to understand what type of content in the resume would be advantageous, cheer up and think what other qualities or activities can you include from your life. Ultimately what matters the most is what you speak in the interview, irrespective of you not being a guitarist or a football player or from CBSE background or with an aggregate of above 80% if you convince the interviewer that you are capable of doing the task given to you then the job is yours!!!!


How to make your resume?

The worst mistake one could do while preparing his/her resume is by copying it from someone else. So please make your own resume and then go to your English lecturer or some friend who is good at English and get it read so that you can mark the errors which you couldn’t point out yourself.

STEP 1- Browse the internet and save a sample resume of a engineering graduate (fresher preferably).Then you will get a rough idea about what are the elements of a resume and also the format.

STEP 2- Make sure that the format you select is not complicated. A simple format is considered the best option because the interviewer on the day of interview is already tired of taking the interviews and if a resume with a very complicated format comes on his desk unnecessarily it would turn his mood off.

STEP 3- After selecting a format write down about yourself on a piece of paper which should majorly include
  • A. Aggregate in school, inter and engineering( also the places where you pursed your education) 
  • B. Mini projects/ internships if any
  • C. Paper presentations if any
  • D. Part time job if any
  • E. Extracurricular activities in college apart from academics which can include N.S.S, sports, college cultural club or and other association or committee.( anything worth mentioning about yourself in your school/intermediate as well, For example-NCC, scouts & guides,)
  • F. Your aim in life both short term and long term
  • G. Languages you can speak
  • H. Info about your family, the occupation of your siblings or parents
  • I. Strengths 
  • J. Weakness (you should never mention your weakness in your resume and never in the interview as well. Until and unless the interviewer asks you about your weakness, just avoid it. But one should always keep in mind his weakness because when the questions pops out you should be in position to tell him, telling him that you don’t have any weakness would probably be the worst answer you could give because that would simply mean that you are telling him that you are perfect and the interviewers would hate you for that!!!)

STEP 4- Prepare a resume using all the above info 12pt font and times new roman(best combo for resume writing). Use side headings and fill up the resume and make sure whatever you write you keep it short not more that a line and always use bullets.

STEP 5- Resume of a fresher should never exceed 2 pages, so edit the resume and get it read by someone.

STEP 6- Finalize the resume and get it proof read and keep 3-4 copies with you and also a soft copy in your mail because you will have to use it many times.


Mini/study project or an internship

Whether the company is IT based or core a question regarding your mini/study project is compulsory. 

What exactly is this? 
In your four years of engineering apart from the final year project which is mandatory for everyone there is thing called mini/study project which is compulsory for students studying in colleges affiliated to BPUT.

When to do it?
There is no particular time for doing it but mostly students complete this in their 3rd year. I personally suggest 3rd year 2nd semester is the best time to do it because 4th year will be a little late as the companies would start coming as soon as the semester begins.

Where to do it?
It can be done at any industry/institute/plant related to your branch of engineering. Many or our ELECTRICAL & ELECTRONICS students carry out their mini project at BSNL, it costs around 3000 approx. It is recommended to carry out your project at some place where you can gain practical knowledge in a short span of time. These are just a few examples my advice would be to contact your branch seniors for the contacts they can guide you in the best way possible.

How is this useful?
In the interviews apart from your subject and your hobbies etc they would like to know if you have the urge to take a step further find out about the various industries and complete a project in it. Almost everyone does it for the certificate and yes you have to do it for certificate and when it comes to learning part common whom are you kidding what can you learn in a week or two and moreover what can you contribute to your project All that is crap when ever this question of what was your contribution/ What actually did you do there?? Pops out just tell them that it was just a study project and explain him a little about your project, they don’t expect more than that!!! And also convey that you are interested in the application part of engineering which made you do that project!!!!

What if you didn’t do any such project?
No problem at all….just choose some topic Google it and write it in your resume under the name of some industry (They won’t ask you to show the certificate, But if they do then only god must save you: P) Better get a certificate, why to take risk!!!


Dress etiquette

GUYS

  • For guys a formal shirt and pant, shirt preferably of a lighter shade, tie is optional.
  • Make sure the color of your socks and pant match, similarly color of belt and shoes should match each other.
  • Please shave...Interview with a beard is a total no.
  • Try to avoid chains/bracelets, a simple watch is fine, and finally smile on the face would make you look perfect.

GIRLS

  • If you are comfortable with formal shirt and skirt then go for it( I have not seen anyone till now except for the H.R with such a dress code) otherwise a simple churidar would do it.
  • Avoid jewelry or any other flashy accessories.
  • Hair should be styled in a simple fashion and shouldn’t draw much attention.

“Don’t overdress; there should be a clear demarcation between the interviewer
and the interviewee: P”




Research about the company and job profile

This is the point where you can make a difference, irrespective of how good your academics are or how many projects you have done. A person who actually/seriously wants the job won’t hesitate to do some extra homework and find out about the company details. Just brief info is enough but where you need to work carefully is finding out the exact job profile for which you are attending the placement.

Instead of asking about the job profile in the interview or waiting for the pre placement talk I would rather suggest you to check out Website/forums or talk to the seniors who already work there, somehow find out and be very clear about what exactly you will be doing once you join the company.
 
Once you are familiar with the job profile you can asses yourself and find out if your profile is suitable to the job profile. Moral of the story is, if your interests and your profile meets the job profile then well and good go ahead be yourself give your best shot but what if it doesn’t match the and you want the job pretty badly then 
give the interviewer what he wants not what you have or what you like, give examples which would assure him that you are fit for that job, if you really don’t have examples then make upsome”

How to prepare for placements?

As already said there are different aspects involved in the selection procedure.
You’ve got to be ready for all those.
1) WRITTEN TEST
2) GROUP DISCUSSION
3) INTERVIEW

1) WRITTEN TEST

The first and the foremost step in any job interview process is a written test. This is basically for mass elimination. Depending on the requirement of the particular company people are shortlisted through this.Software companies mostly test verbal and analytical ability of a person so one can expect questions from these two fields. Unless and until the job profile requires good knowledge about programming languages questions won’t be asked based on them.But this doesn’t apply for all the companies, for example Microsoft’s testing procedure involves questions from programming etc. So people apart from IT or CSE would find themselves in a tough situation.Now coming to core companies, they would like to check your knowledge in your field as well so one needs to brush up their technical skills before appearing for the test.

A) For software companies
  • Whether software or core the first step in preparation should be solving “Quantitative aptitude by R.S.AGARWAL “
  • You need not solve the entire book, just check out all the models and practice questions from each model. By the end of it you be in a position to solve any of those models in the actual written test.
  •  Once you are well acquainted with these models you can easily crack the quant section and time won’t be an issue
  • For verbal section there is no particular book to refer to, but it would mostly involve reading comprehensions, synonyms, antonyms, sentence correction ,grammatical error correction etc
  • So any decent book with all the above exercises would make it up(unless you really have a problem in verbal, preparation is not required for this section coz the questions are pretty basic)
  • Apart from that “puzzles to puzzle you by Shakuntala devi” is a good book(haven’t read it personally but lot of forums suggest it’s a good one)
  • And finally sometimes GK is also a part of the test paper so it’s better if you are aware of current affairs etc.
B) For core companies
  • As already said the testing procedure varies from company to company so apart from the above mentioned points one needs to be on toes when it comes to technical knowledge related to his/her field of engineering if he/she wants to make it to a core company
  • You need to be really smart when you are preparing for a core company’s written test. It would be very difficult for you to study all the topics of engineering covered in the last 4 years in such a short period of time so I would suggest you to first check what the company/job profile demand  and then start preparing accordingly.
  • For ex. LNT (a mechanical core company) deals with solutions to engineering design problems and provides technology. Once you well acquainted with the companies profile you can prepare specifically. One can study machine design, mechanics of materials etc and leave topics like material science or kinematics of materials.
  • What I am trying to say is first do a background check on company’s profile and then mainly on job profile (by checking out the website or asking your seniors or people who work in that company) then you would understand what kind of job it is and what are the subjects that would be necessary in order to do that job. Once you are clear with that it will be easy for you to prepare

NOTE: The written test for any company would check your basic knowledge; in depth detail in any topic won’t be required so relax.

P.S: After reading the above context please don’t feel that one needs to put in so much effort just for the written test coz there are lot of cases where people don’t do any of it and still get through the written test. But preparation is the best thing coz it will be useful for all the other companies as well and would boost up your confidence.

2) GROUP DISCUSSION


This is a pretty interesting part of the recruitment process because it has nothing to do neither with your subject knowledge nor with your verbal/quant ability. Let me first explain what exactly happens in a GD. All the shortlisted candidates are made into groups. Then batches are called and a topic is given to them to speak. Topic can be anything, so you can’t prepare anything in advance. Before the group discussion starts some time is given for you to prepare what you are going to speak (usually you are given a piece of paper for jotting down your ideas).Then starts the group discussion and it lasts for about 10-15 minutes.

HOW TO WIN A GROUP DISCUSSION??? 
  • PEN DOWN: The first and the most important step would be jotting down all the ideas that come to your mind before the GD starts. For example: assume topic is “RESERVATION SYSTEM” As soon I hear the topic, things which come to my mind are college admissions,caste based quota, implementation of reservation system based on economic basis backed up by merit, government policies and movie rajneeti: P.Time up….so now the GD starts…as soon as it starts try to restructure your ideas in the order cause, effects and solution. It’s little difficult to do in such a short span of time and in such chaos but try doing it. 
     
  • SPEECH: The way you speak reveals your personality and thus your chance of making through GD. Make sure whenever you speak your voice is loud and clear (which are signs of confidence), only then people would look at you when you speak.Don’t bother about the language at all, just be confident about what you speak, Even if your English is not that good make sure you speak aloud and make your point in a precise manner.
Note: there is a clear demarcation speaking loudly and shouting. (Just because you     want to win the GD don’t shout at top of your voice it’s considered  unprofessional)
  • EYE CONTACT: eye contact is very important whenever you communicate with anyone(again a sign of confidence). Don’t shy away even if you are talking to your opposite gender, look right in the eye )
  • INITIATION: Starting the group discussion requires lot of courage and confidence. It would fetch you many points as initiating is considered the first quality of a leader.
If you are very confident about the topic and have real good points to speak then you should not wait, go for the kill and start of the discussion with full energy.

  • GIVE OTHERS CHANCE TO SPEAK: Just because you are well familiar with the topic doesn’t mean you keep on talking all by yourself. Speak for a couple of minutes and then make a gesture looking at others indicating that it’s the turn now.
  • CLOG BREAK: Many a times whenever somebody is speaking you wait for your turn and as soon as he/she is done many people start to speak simultaneously, don’t stop whatever you started continue speaking loud and clear until others are forced to stop. This would fetch you hell lot of points.
  • STAND OUT OF THE CROWD: This one is real crazy. I’ll try to explain it with a example. Let the topic be ADOLF HITLER .Let us assume there are 8 people in the group and all the 7 members are against ADOLPH HITLER. You start talking by telling that ‘’ I admire MR.ADOLPH HITLER, as soon as you say you support it the attention of all the 7 members and also the recruiters would be drawn towards you, this would make you stand out of the group. But when you say that you admire him you should immediately explain why you do so with a couple of points (For ex: according to me he is one of the greatest orators of all time, he had the ability to persuade the whole of Germany,his baritone, leadership skills and command over public speaking were truly remarkable)

Imagine all the members of the group speaking against him, about the war about the killings, about the massacre, about the damage done to the world on one side and you on the other side supporting him, admiring him(and giving reasons for why you do so)……surely you will emerge the winner of GD.
NOTE: Only if you are very confident of giving out valid points supporting your
argument only then go for this type of strategy

CONCLUSION: Sometimes what happens is that you don’t get a chance to speak in the entire GD (Reasons could be anything, maybe you were not confident enough, may be you didn’t have content to speak). But you can still turn it upside down, just recollect what all the others said and make a nice conclusion with all the strong and valid points and present it with utmost confidence ( it should look as if all those points were your own :P )

*** What if you aren’t able to think of points related to the topic given during a group discussion?? 
  • Don’t worry at all, it is a pretty common phenomenon
  • When you don’t have any points then don’t try to start the GD just because you want to initiate somehow.
  • Instead wait for others to speak and listen to them very carefully…if you get any points in that process then well and good if not then just combine a few ideas of others, frame a nice sentence and present it as if it was yours

TIPS & TRICKS 

  • initiate by taking a side…you can talk for the topic, against it or can do both in a diplomatic way
  • Don’t argue with people who are against you instead avoiding them and switch to others to speak
  • Don’t point out anyone’s errors ( its disastrous)
  • Take initiation only if you are very confident about the topic else it will backfire.
  • Speak out complete sentences not just phrases that way you can give yourself time to think and also protect yourself from being interrupted by others
  • Take examples/statistics/facts or any recent issue to support your argument
  • Don’t be a mute
  • Don’t allow a person to talk more that what is required instead interrupt him and make your point in a loud and clear voice until he stops speaking
  • MAKE SURE WHENEVER YOU SPEAK YOU ARE LOUD & CLEAR
  • Don’t take anything personally, it’s a professional thing
  • Picking up fights with others is a total no, hell no

3) INTERVIEW

You just can’t go out and speak in interview. There are a few things which you need to take care of before the day of your interview. Some of the aspects of an interview:
i. Resume
ii. Mini/study project
iii. Dress code
iv. Research about the company and job profile
v. On the day of interview/during an interview

What is a campus placement?



                       
Campus placement is the program conducted within educational institutes or in a common place to provide jobs to students pursuing or in the stage of completing the opted course. Industries visit the colleges to select students depending on their ability to work, capability, focus and Aim. The recruitment broadly consists of:

a) WRITTEN TEST
b) GROUP DISCUSSION
c) TECHNICAL INTERVIEW
d) HR INTERVIEW

Don’t get tensed all these rounds are only for a few companies, majority of the companies which look for mass recruitment conduct a written test followed by an interview that’s it!!! All the above mentioned rounds are nothing but means to eliminate people. One needs to survive this elimination process to ultimately get selected.
 
Different companies have different approach to select freshers. Some mainly focus on individual’s communication skills, some look for technical knowledge,some go for problem solving skills, ultimately the testing procedure is based on the job profile.
 
The number of people getting selected entirely depends upon the company’s requirement at that period of time. If a person’s profile meets the job profile he/she gets selected. Campus placement according to me is the easiest way of getting a job. 


Why campus placement?

I want this to be a little dramatic so please bare with me….We have been studying all our life till now. Parents tell their children, when they are in 10th standard that it is the most important part of their life so they are supposed to work very hard for getting a good percentage and once they are done with that they will have a very bright future, children feel ecstatic about the deal and work very hard and hope their life would be happily ever after. But here it comes again when they join 11th standard or in our state intermediate…again the same crap and this time with increased intensity and pressure. Somehow they manage to get through this as well…and finally it’s down to engineering!!!! The question comes into your mind...Ok I worked like a donkey for hours together and ended up in this college...What’s next??? The first three years we enjoy...we don’t give damn about anything...and all of sudden you are in your final year...it’s as if everything happened in a split second!!!
 
People around you come up with questions regarding your life that completely freak you out…What after engineering?, Being the scariest of all.
 
There is time when everyone in the class feel masters is the best option and they book slots for GRE (in the end not more than 10% actually pursue M.S due to various reasons...that’s none of our concern) then there is time when everyone talks about M.TECH…suddenly people start joining GATE classes…half of them feel the competition is way too high and lose hope even before writing the exam…for this as well not more than 10 percent actually get a seat in IIT’s NIT’s…and very few actually appear for the interviews and pursue MTECH….

So what about the rest of the people in class??? Majority of people in the class end up taking a job. Some of them are focused from the very beginning that they are going to take up a job, some of them want a job because they couldn’t get into the university they applied for, some do it for experience so that that the cud pursue MBA after 2 years, some coz they have nothing in their min, and some coz their parents force them to take up a job…and the list goes on. So when you have decided to take up a job, why not try for the job that pays you higher than others.

“Trust me the best way of getting a job is campus placement...some might feel that they will apply off campus n all that but that should be secondary because in this country of 1 billion people….the competition is tremendous, you just can’t go out searching for job…But whereas when the company comes to your college the number of people competing for the job are comparatively very less, and the people competing against you are your fellow classmates which is I guess is better than competing against complete strangers coz you would have a clear idea about each and every person competing!!! More importantly your college being your home ground instills some confidence in you so it’s very easy to crack a placement on campus”
\