IBM is one of the top companies and leading recruiters. It is soon going to visit your campus for recruitments for the year 2018. So, if you're wondering how to get through the recruitment and bag the job from IBM, here we are to guide you through. In this blog, we've discussed the sample questions on coding which are likely to be asked in IBM recruitment.
1. Write a program to find HCF of two numbers by without using recursion.
The first line contains any 2 positive numbers separated by space.
Print the HCF of given two numbers.
|Solution code|| |
|Solution Explanation|| |
int m,n; //declare required variables
scanf("%d",&m); //scan the inputs
while(m!=n) //check the condition
if(m>n) //if it is satisfied
m=m-n; //update m value
n=n-m; //otherwise n value
printf("%d",m); //print it
2. Write a C program to find the sum of A.P(Arithmetic Progression ) series
• The first line contains the first term of the A.P series.
• The second line contains a total number of terms in A.P series
• The third line contains the common difference of A.P series.
• Sum of the A.P series.
3. Write a program to calculate the standard deviation.
N(Number of Integers)
The standard deviation of the given integer.
1 2 3 4 5 6 7 8 9 10
If you want to practice more such programming tasks and find the solution of the above-mentioned questions then check out Conduira Online's Programming Hub that contains 200+ similar programming tasks with a varying level of difficulty.
Check Other Blogs on IBM Recruitment