Wipro Turbo Coding Questions for Freshers

   

Wipro Turbo Coding Questions

Wipro is a market leading Information Technology, consulting and business process services company. It is also one of the top recruiters. Wipro has started it's Turbo recruitments for the year 2018 from this month. Wondering how the recruitment process goes? Want to know the sample questions that will be asked in Wipro turbo? Then go on and read this blog to find out the sample coding questions for Wipro Turbo. 

Take Free Wipro Mock Test

Wipro Coding Questions for Freshers 2018 and 2019

1. Write a C program to convert a decimal number to binary and print the count of 1's in it. If 1's are not present in binary number then print invalid input.

Input Format:

Integer

Output Format:

The number of 1's in the binary number of the given integer.

Sample Input:

134

Sample Output:

3

Sample Question  Answer 
Solution Code 

#include<stdio.h>

int main()

{

nt n,bin=0,rem,f=1,count=0;

    scanf("%d",&n);

    while(n>0)

 

    {

        rem=n%2;

  if(n%2==1)

            count++;

        bin=bin+rem*f;

 

        f=f*10;

        n=n/2;

    }

    if(count>0)

        printf("%d",count);

 

    else

 

        printf("invalid");

    return 0;

Solution Explanation 
  • First take input and convert given number into binary number.

scanf("%d",&n); //scanning the decimal number...

Count the number of ones in the binary number. 

 

while(n>0) 

 {

 

       rem=n%2; // changing to binary number

 

       if(n%2==1)

 

           count++; //counting number of 1's in the binary number.

 

       bin=bin+rem*f;

 

       f=f*10;

 

       n=n/2;

 

 

  }

Print the count.

if(count>0)

 printf("%d",count); // printing number of 1's

else

              printf("invalid"); // if number of 1's in 0 then print

 

"invalid".

2. Write a C program to print the sum of digits of the given number.

Input Format:

Digit

Output Format:

Sum of the digit

Sample Input:

123

Sample Output:

6

3. Write a C program to find factors of a positive integer.

Input Format:

Positive integer

Output Format:

Factors separated by space

Sample Input:

60

Sample Output:

1 2 3 4 5 6 10 12

Sample Input:

60

Sample Output:

1 2 3 4 5 6 10 12

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. 

3 Wipro Mock Tests - 200+ Programming Tasks

Check out Other Blogs on Wipro 

Wipro Turbo Exam Pattern

Wipro Turbo Eligibility Criteria

Wipro Quantitative Aptitude Questions  

Wipro Reasoning Questions 

Wipro Verbal Questions  

Read 119 times Last modified on Thursday, 27 September 2018 11:11
Login to post comments

Vocabprep Banner

Please key in your e-mail address.

Be up-to-date with the happenings at Conduira!