All-You-Need-to-Know-About-Wipro-Coding-Questions-to-Ease-Your-Prep

Do you have an upcoming interview with WIPRO and want to know about some of the questions that are commonly asked of freshers? Are you not able to find good coding questions on the internet? Here is a comprehensive list of Wipro Coding Questions that most interviews ask.

Wipro is one of the globally renowned Indian tech giants in the Digital, Technology, and Business Solutions domains. With its Indian headquarters in Bengaluru, Wipro is one of the most sought-after employers, with 220,000 employees serving clients across six continents.

Wipro offers an average salary of ₹3,82,822 per year for coding freshers. Entry-level programming jobs at Wipro offer a high scope for learning and growth. Nonetheless, if you are a software job aspirant aiming to crack the interview in this tech giant, Wipro coding questions are the place to start your interview prep.

Wipro Coding Questions to Ease Your Interview Prep

All-You-Need-to-Know-About-Wipro-Coding-Questions-to-Ease-Your-Prep

Wipro coding questions 1:

Write a program to implement a bubble sort algorithm for sorting the elements of an array. ( Source

Code in C:

#include <stdio.h>

void bubbleSort(int arr[], int n)

{

int i, j, temp;

for(i = 0; i < n; i++)

{

for(j = 0; j < n-i-1; j++)

{

if( arr[j] > arr[j+1])

{

temp = arr[j];

arr[j] = arr[j+1];

arr[j+1] = temp;

}

int main()

{

int arr[100], i, n, step, temp;

scanf(“%d”, &n);

for(i = 0; i < n; i++)

{

scanf(“%d”, &arr[i]);

}

bubbleSort(arr, n);

for(i = 0; i < n; i++)

{

printf(“%d “, arr[i]);

}

return 0;

}

Code in C++:

#include<iostream>

using namespace std;

void swap(int *i, int *j)

{

int temp = *i;

*i = *j;

*j = temp;

}

int seperateEvenAndOdd(int arr[], int size)

{

int left = 0;

int right = size – 1;

while(left < right)

{

while(arr[left]%2 == 0 && left < right)

{

left++;

}

while(arr[right]%2 == 1 && left < right)

{

right–;

}

if(left < right)

{

swap(&arr[left], &arr[right]);

left++;

right–;

}

int main()

{

int arr_size;

cin >> arr_size;

int arr[arr_size];

for(int i=0;i<arr_size;i++)

{

cin >> arr[i];

}

int i=0;

seperateEvenAndOdd(arr,arr_size);

for(i=0;i<arr_size;i++)

cout << arr[i] << ” “;

return 0;

}

Input:

6

34 9 13 81 64 2

Output:

2 9 13 34 64 81

Wipro coding questions #2

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 the binary number, print invalid input.

Also Read:  Tips for Breaking into Data Science After BCA

Code in C: (Source)

/*

* C program to accept a decimal number and convert it to binary

* and count the number of 1’s in the binary number

*/

#include <stdio.h>

void main()

{

long num, decimal_num, remainder, base = 1, binary = 0, no_of_1s = 0;

printf(“Enter a decimal integer \n”);

scanf(“%ld”, &num);

decimal_num = num;

while (num > 0)

{

remainder = num % 2;

/* To count no.of 1s */

if (remainder == 1)

{

no_of_1s++;

}

binary = binary + remainder * base;

num = num / 2;

base = base * 10;

}

printf(“Input number is = %d\n”, decimal_num);

printf(“Its binary equivalent is = %ld\n”, binary);

printf(“No.of 1’s in the binary number is = %d\n”, no_of_1s);

}

Output:

$ cc pgm46.c

$ a.out

Enter a decimal integer

134

Input number is = 134

Its binary equivalent is = 10000110

No.of 1’s in the binary number is = 3

Wipro coding question #3:

Given a binary number as input, we need to write a program to convert the given binary number into an equivalent decimal number.

Code in C++: (Source)

// C++ program to convert binary to decimal

#include <iostream>

using namespace std;

// Function to convert binary to decimal

int binaryToDecimal(int n)

{

int num = n;

int dec_value = 0;

// Initializing base value to 1, i.e 2^0

int base = 1;

int temp = num;

while (temp) {

int last_digit = temp % 10;

temp = temp / 10;

dec_value += last_digit * base;

base = base * 2;

}

return dec_value;

}

// Driver program to test above function

int main()

{

int num = 10101001;

cout << binaryToDecimal(num) << endl;

}

Code in Java:

// Java program to convert

// binary to decimal

// Function to convert

// binary to decimal

class GFG {

static int binaryToDecimal(int n)

{

int num = n;

int dec_value = 0;

// Initializing base

// value to 1, i.e 2^0

int base = 1;

int temp = num;

while (temp > 0) {

int last_digit = temp % 10;

temp = temp / 10;

dec_value += last_digit * base;

base = base * 2;

}

return dec_value;

}

// Driver Code

public static void main(String[] args)

{

int num = 10101001;

Also Read:  The Complete Guide: Applying for Accenture Assessment Test and Working at Accenture

System.out.println(binaryToDecimal(num));

}

//

Output:

169

Wipro coding question #4:

Write a program to find the factorial of a number using a loop.

Code in C: (Source)

#include <stdio.h>

int main() {

int n, i;

unsigned long long fact = 1;

printf(“Enter an integer: “);

scanf(“%d”, &n);

if (n < 0)

printf(“Error! Factorial of a negative number doesn’t exist.”);

else {

for (i = 1; i <= n; ++i)

{

fact *= i;

}

printf(“Factorial of %d = %llu”, n, fact);

}

return 0;

}

Input:

Enter an integer: 5

Factorial of 5 = 120

Code in C++ (Source)

#include <iostream>

using namespace std;

int main() {

int n;

long double factorial = 1.0;

cout << “Enter a positive integer: “;

cin >> n;

if (n < 0)

cout << “Error! Factorial of a negative number doesn’t exist.”;

else {

for(int i = 1; i <= n; ++i) {

factorial *= i;

}

cout << “Factorial of ” << n << ” = ” << factorial;

}

return 0;

}

Output

Enter a positive integer: 12

Factorial of 12 = 479001600

Wipro Coding Question #5:

How to Remove Duplicates from Array Without Using Java Collection API?

Code in Java:

Import java.util.Arrays;

Now, import org.slf4j.Logger;

import org.slf4j.LoggerFactory;

/**

“Java program to remove duplicates from this array. You don’t

need to physically delete duplicate elements, replacing with null, or

empty or default value is ok.

*

/

public class TechnicalInterviewTest {

private static final Logger logger = LoggerFactory.getLogger(TechnicalInterviewTest.class);

public static void main(String args[]) {

int[][] test = new int[][]{

={1, 1, 2, 2, 3, 4, 5},

{1, 1, 1, 1, 1, 1, 1},

={1, 2, 3, 4, 5, 6, 7},

{1, 2, 1, 1, 1, 1, 1},};

for (int[] input : test) {

System.out.println(“Array with Duplicates : ” + Arrays.toString(input));

System.out.println(“After removing duplicates : ” + Arrays.toString(removeDuplicates(input)));

}

“/

Method to remove duplicates from array in Java, without using

Collection classes e.g. Set or ArrayList. Algorithm for this

method is simple, it first sort the array and then compare adjacent

objects, leaving out duplicates, which is already in the result.

/”

public static int[] removeDuplicates(int[] numbersWithDuplicates) {

// Sorting array to bring duplicates together

Arrays.sort(numbersWithDuplicates);

int[] result = new int[numbersWithDuplicates.length];

int previous = numbersWithDuplicates[0];

result[0] = previous;

for (int i = 1; i < numbersWithDuplicates.length; i++) {

Also Read:  How Taking an Advanced SQL Course Can Boost Your Value as a Data Scientist

int ch = numbersWithDuplicates[i];

if (previous != ch) {

result[i] = ch;

}

previous = ch;

}

return result;

}

Output:

Array with Duplicates : [1, 1, 2, 2, 3, 4, 5]

After removing duplicates : [1, 0, 2, 0, 3, 4, 5]

Array with Duplicates : [1, 1, 1, 1, 1, 1, 1]

After removing duplicates : [1, 0, 0, 0, 0, 0, 0]

Array with Duplicates : [1, 2, 3, 4, 5, 6, 7]

After removing duplicates : [1, 2, 3, 4, 5, 6, 7]

Array with Duplicates : [1, 2, 1, 1, 1, 1, 1]

After removing duplicates : [1, 0, 0, 0, 0, 0, 2]

Wipro Coding Question #6:

Write a program in Java to reverse a number. ( Source

Code in Java:

public class Solution {

public static long reverseNumber(long n) {

// Remove all trailing zeros

while (n % 10 == 0) {

n = n / 10;

}

// Declare reverseNum and remainder and initialize them with 0

long reverseNum = 0;

long reminder = 0;

while (n > 0) {

reminder = (int) (n % 10);

reverseNum = reverseNum * 10 + reminder;

n = n / 10;

}

// Return the reverse number

return reverseNum;

}

Input:

3456

Output:

6543

Become a SuperCoder with CodeQuotient

However, the Wipro coding questions we have provided here are for a basic understanding. Coding questions in interviews can vary in complexity and experience level. To ace a coding interview of any complexity level, you will need training from experts.

CodeQuotient’s trainers in our Software Engineering Bootcamp are experts in simplifying coding and helping you crack interviews confidently. Get in touch with our team to know how our dedicated software training internships help you kickstart your software career.


Get UGC Approved, BCA Degree
And Earn While You Do That

Join CodeQuotient's Under-Graduate Program In Software Engineering

Get Paid Internship with Our Hiring Partners to Sponsor Your Fees

100% Placement Assistance


Leave a Reply

Your email address will not be published. Required fields are marked *

Archives