Wipro Elite NTH Coding Questions | PrepInsta

Wipro NTH Coding Questions and Answer

Wipro Elite NTH Coding Questions and Answer are not like a general Programming Round Questions with Solutions it is all together different from C programming.

We have analyzed over 100+ Wipro NTH Coding Questions. Below you will find Similar pattern based Wipro NTH Coding Round Questions, Wipro NTH Coding Questions that are asked constantly in Wipro NTH Placement test. The languages that you can use in the test are C , C++ , Java and Python.

Wipro Elite NTH Coding Questions
Total number of questions2 questions
Total Time Duration60 minutes
Type of TestAdaptive
Negative MarkingNo

WIPRO NTH PROGRAMMING MODEL QUESTIONS AND ANSWERS

 In this page you will find some previous years coding questions asked  during the campus placement:

  1. Wipro NTH C Programming Questions for On Campus
  2. Wipro NTH Java Programming Questions for On Campus
  3. Wipro NTH C++ Programming Questions for On Campus

Free Material

  • Program to calculate the GCD of two numbers –
  • Program to calculate the GCD of three numbers – 
  • Program to check if the given number is Prime or not – 
  • Program to Display the distinct elements of an array –
  • Program to Sort first half in ascending order and second half in descending order in an array –
  • Program for Matrix multiplication  –
  • Program to Remove vowels from an input string –
  • Program to Print Sum of all Odd Numbers present in a larger number –
  • Program to Print the Transpose of a matrix –
  • Program to Display the largest element in each row in a 2-D Array –
  • Program to Check the balance of Parenthesis –

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Some Coding Questions for Practice

Question 1

Wipro’s client eBay wants to run a campaign on their website, which will have the following parameters, eBay wants that on certain x products, they want to calculate the final price, for each product on eBay there will be a stock unit parameter, this parameter will denote, how many items are their in their fulfillment center

Now, while these numbers if are positive means product x is available in the fulfillment center and if not than the product is not available and cannot be shipped to the customer 

Now the price on for each product varies based on the distance of the customer from the fulfillment center. Now, each product is in different fulfillment zone. Now, these values are 00’s kms for each centurion km. The price available would further increase by factor distance.

You’ve to find the maximum discount price for each product if the product can be shipped.

Following are the input/output parameters :

Input

  •  The first line of the input will contain number of products.
  • The second line will contain price for each of these products.
  • The third line contains shipping distance in 00’s kms
  • The fourth line contains SKU’s

Output

  • It will contain the final price for each deliverable item in SKU’s

Example :

Input:

  • 6
  • 87 103 229 41 8 86
  • 3 1 9 2 1 2
  • 7 -21 30 0 -4 -3

Output

  • 261 2061

Question : 2

(asked in Wipro On Campus, Sastra University, Aug, 2019)

Problem: in this first line you are required to take the value of m and n as the number of rows and columns of matrix, then you are required to take the input elements of array.
As an output you are required to print the sum of each row then the row having the maximum sum.
Test Case :
Input : 3 3
1 2 3
4 5 6
7 8 9
Output :
Row 1 : 6
Row 2 : 15
Row 3 : 24
Row 3 is having the maximum sum : 24

Question : 3

(asked in Wipro On Campus, PESIT Bangalore, Oct, 2019)

Problem: You are required to count the number of words in a sentence.
You are required to pass all the test cases

Test Cases :
Test Case : 1
Input : welcome to the world
Output : 4

Test Case : 2
Input : [space] say hello
Output : 2

Test Case : 3
Input : To get pass you need to study hard [space] [space]
Output : 8

Question : 4

(asked in Wipro On Campus, VIT University, Aug, 2019)

Problem: First of all you need to input a whole sentence in the string, then you need to enter the target
word.
As an output you need to find the number of times that particular target word is repeated in the
sentence.

Test Cases :

Test Case : 1
Input : welcome world to the new world
world
Output : 2

Test Case : 2
Input : working hard and working smart both are different ways of working
working
Output : 3

Question : 5

(asked in Wipro On Campus, MIET Meerut, Aug, 2019)

Problem Statement

You are required to implement the following function:
Int SumNumberDivisible(int m, int n);

The function accepts 2 positive integer ‘m’ and ‘n’ as its arguments.
You are required to calculate the sum of numbers divisible both by 3 and 5, between ‘m’ and ‘n’ both inclusive and return the same.

Note
0 < m <= n

Example
Input:
m : 12
n : 50
Output   90

Explanation:
The numbers divisible by both 3 and 5, between 12 and 50 both inclusive are
{15, 30, 45} and their sum is 90.

Sample Input

m : 100
n : 160

Sample Output

510

Question : 6

(asked in Wipro On Campus, Galgotia University Noida, Aug, 2019)

Input
The first line of input consists of three space separated integers. Num, start and end representing the size of list [N], the starting value of the range and the ending value of the range respectively.
The second line of input consists N space separated integers representing the distances of the employee from the company.

Output
Print space separated integers representing the ID’s of the employee whose distance liew within the given range else return -1.

Example
Input
6 30 50
29 38 12 48 39 55

Output
1 3 4

Explanation :
There are 3 employees with id 1, 3, 4 whose distance from the office lies within the given range.

Question : 7

(asked in Wipro On Campus, IIIT Hyderabad, Aug, 2019)

Write a code for the following functions
Function 1 : sortArray
It’s function is to sort the passed array with a particular length, there are 2 parameters passed into it first is the length of array and next is the elements of list.
Function 2 : findMaxElement
It’s function is to get the 2 array with their own particular elements and length, and find the maximum element from both the array and print it.

Input
12
2 5 1 3 9 8 4 6 5 2 3 11
11
11 13 2 4 15 17 67 44 2 100 23

Output
100

Question 8

(asked in Wipro On Campus, HBTI Kanpur, Sep, 2019)

Problem: you are given a number, and you have to extract the key by finding the difference between the sum of the even and odd numbers of the input.

Test Case :

Input : 24319587

Output :  11

Explanation : odd terms : 3 + 1 + 9 + 5 + 7 = 25

                              even terms : 2 + 4 + 8 = 14

                              output : 11 (25-14)

Question 9

(asked in Wipro NLTH 2019)

Problem:  in this first line you are required to take the value of m and n as the number of rows and columns of matrix, then you are required to take the input elements of array.

As an output you are required to print the sum of each row then the row having the maximum sum.

Test Case :

Input : 3 3

               1 2 3

               4 5 6

               7 8 9

Output :  

               Row 1 : 6
               Row 2 : 15
               Row 3 : 24

               Row 3 is having the maximum sum : 24

Question 10

(asked in Wipro NLTH 2019)

Problem:  in this first line you are required to take the input that set the number of elements to be inserted, the next line takes the elements as input.

You are required to print the sum of maximum and minimum element of the list

Test Case :

Input : 6

               55 87 46 21 34 79

Output :  

               108 

Explanation : 

               21 + 87 = 108

Question 11

(asked in Wipro NLTH 2019)

Problem:  in this first line you are required to take the input of an integer number, and in the second line you are required to input the target element 

You are required to print the number of time target element occured in the integer

Test Case :

Input : 734139

               3

Output :  

               2 

Explanation : 

               3 occured 2 times in the integer.

Paid Material

TCS SMART VERBAL

Wipro NTH Coding  Question 1

TCS SMART VERBAL

Wipro NTH Coding  Question 2

TCS SMART VERBAL

Wipro NTH Coding  Question 3

Wipro NTH Coding Question 4

ibm english syllabus

Wipro NTH Coding Question 5

ibm english syllabus

Wipro NTH Coding Question 6

ibm verbal syllabus

Wipro NTH Coding Question 7

Wipro NTH Coding Question 8

ibm english syllabus

Wipro NTH Coding Question 9

ibm english syllabus

Wipro NTH Coding Question 10

ibm verbal syllabus

Wipro NTH Coding Question 11

Wipro NTH Coding Question 12

ibm english syllabus

Wipro NTH Coding Question 13

ibm english syllabus

Wipro NTH Coding Question 14

ibm verbal syllabus

Wipro NTH Coding Question 15

Wipro NTH Coding Question 16

Wipro NTH Coding Question 17

Wipro NTH Coding Question 18

ibm english questions and answers

Wipro NTH Coding Question 19

ibm english questions and answers

Wipro NTH Coding Question 20

Wipro NTH Coding Question 21

Wipro NTH Coding Question 22

ibm english questions and answers

Wipro NTH Coding Question 23

ibm english questions and answers

Wipro NTH Coding Question 24

TCS SMART VERBAL

Wipro NTH Coding  Question 25

TCS SMART VERBAL

Wipro NTH Coding  Question 26

TCS SMART VERBAL

Wipro NTH Coding  Question 27

Wipro NTH Coding Question 28

TCS SMART VERBAL

Wipro NTH Coding  Question 29

TCS SMART VERBAL

Wipro NTH Coding  Question 30

TCS SMART VERBAL

Wipro NTH Coding  Question 31

Wipro NTH Coding Question 32

Wipro NTH Coding Question 33

Wipro NTH Coding Question 34

ibm english questions and answers

Wipro NTH Coding Question 35

ibm english questions and answers

Wipro NTH Coding Question 36

ibm english syllabus

Wipro NTH Coding Question 37

ibm english syllabus

Wipro NTH Coding Question 38

ibm verbal syllabus

Wipro NTH Coding Question 39

Wipro NTH Coding Question 40

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription

127 comments on “Wipro Elite NTH Coding Questions | PrepInsta”


  • Esther

    QUESTION 6
    import java.util.Scanner;

    public class pp2 {
    public static void main(String[] args) {

    System.out.println(“Enter the total numbers in an array”);
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    System.out.println(“Enter the range”);
    int n1=sc.nextInt();
    int n2=sc.nextInt();

    int arr[] =new int[n];
    System.out.println(“Enter the numbers”);
    for(int i=0; i<n; i++)
    {
    //reading array elements from the user

    arr[i]=sc.nextInt();
    }
    for(int i=0;i= n1 && arr[i]<=n2) {
    System.out.println(i+1);
    }
    else {

    System.out.println("Number is not within the range");
    }
    }
    }

    }}


  • 17-4E9

    # Question 2 in python language

    row,col = list(map(int,input().split()))
    l = []
    maxi = 0
    max_row = 0
    for i in range(row):
    l1 = list(map(int,input().split()))
    if maxi < sum(l1) :
    max_row = i
    maxi = max(maxi,sum(l1))
    l.append(l1)
    for i in range(row):
    print("Row "+str(i+1) + " : "+str(sum(l[i])))
    print("Row "+str(max_row+1)+" is having the maximum sum : "+str(maxi)+"")


  • oruganti

    question 11 java
    import java.util.*;
    class Ork{
    public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int t=sc.nextInt();
    int count=0;
    while(n>0){
    int x=n%10;
    if(x==t)
    ++count;
    n/=10;
    }
    System.out.println(count);
    }
    }


  • oruganti

    question 10 java
    import java.util.*;
    class Ork{
    public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int a[]=new int[n];
    for(int i=0;i<n;i++){
    a[i]=sc.nextInt();
    }
    int max=Integer.MIN_VALUE,min=Integer.MAX_VALUE;
    for(int i=0;imax){
    max=a[i];
    }
    if(a[i]<min){
    min=a[i];
    }
    }
    int result=max+min;
    System.out.println(result);
    }
    }


  • oruganti

    question 8 in java
    import java.util.*;
    class Ork{
    public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int sum=0,sum1=0;
    while(n>0){
    int x=n%10;
    if(x%2==0){
    sum+=x;
    }
    else{
    sum1+=x;
    }
    n/=10;
    }
    System.out.println(Math.abs(sum-sum1));
    }
    }


  • oruganti

    question 7 in java
    import java.util.*;
    class Ork{
    static int[] sortarray(int arr[],int l){
    for(int i=0;i<l-1;i++){
    for(int j=0;jarr[j+1]){
    int temp=arr[j];
    arr[j]=arr[j+1];
    arr[j+1]=temp;
    }
    }
    }
    return arr;
    }
    static void findmax(int c[],int d[]){
    if(c[c.length-1]>d[d.length-1]){
    System.out.println(c[c.length-1]);
    }
    else{
    System.out.println(d[d.length-1]);
    }
    }
    public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int a[]=new int[n];
    for(int i=0;i<n;i++){
    a[i]=sc.nextInt();
    }
    int m=sc.nextInt();
    int b[]=new int[m];
    for(int i=0;i<m;i++){
    b[i]=sc.nextInt();
    }
    int c[]=sortarray(a,n);
    int d[]=sortarray(b,m);
    findmax(c,d);
    }
    }


  • oruganti

    question 2 in java
    import java.util.*;
    class Wipro1{
    public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int m=sc.nextInt();
    int n=sc.nextInt();
    int a[][]=new int[m][n];
    for(int i=0;i<m;i++){
    for(int j=0;j<n;j++){
    a[i][j]=sc.nextInt();
    }
    sc.nextLine();
    }
    int a1[]=new int[m];
    for(int i=0;i<m;i++){
    for(int j=0;j<n;j++){
    a1[i]+=a[i][j];
    }
    System.out.println("Row "+(i+1)+":"+a1[i]);
    }
    int max=0;int j=0;
    for(int i=0;imax){
    max=a1[i];
    j=i+1;
    }
    }
    System.out.println(“row “+j+” is having maximum sum: “+max);
    }
    }


  • oruganti

    question 6 in java
    import java.util.*;
    class Wipro5{
    public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int s=sc.nextInt();
    int e=sc.nextInt();
    int a[]=new int[n];
    for(int i=0;i<n;i++){
    a[i]=sc.nextInt();
    }
    Vector v=new Vector();
    for(int i=0;i=s && a[i]<=e){
    v.add(i);
    }
    }
    for(int i=0;i<v.size();i++){
    System.out.print(v.get(i)+" ");
    }
    }
    }


  • oruganti

    question 5 in java
    import java.util.*;
    class Wipro4{
    static int SumNumberDivisible(int m,int n){
    int sum=0;
    for(int i=m;i<=n;i++){
    if(i%3==0 && i%5==0){
    sum+=i;
    }
    }
    return sum;
    }
    public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int m=sc.nextInt();
    int n=sc.nextInt();
    int result=0;
    if(m<=n){

    result=SumNumberDivisible(m,n);
    }
    else{
    System.out.println("invalid");
    }
    System.out.println(result);
    }
    }


  • oruganti

    question 4 in java
    import java.util.*;
    class Wipro3{
    public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    String s=sc.nextLine();
    String s1=sc.nextLine();
    StringTokenizer st=new StringTokenizer(s);
    int count =0;
    while(st.hasMoreTokens()){
    if(s1.equals(st.nextToken())){
    ++count;
    }
    }
    System.out.println(“output: “+count);
    }
    }


  • oruganti

    question 3 in java
    import java.util.*;
    class Wipro2{
    public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    String s=sc.nextLine();
    StringTokenizer st=new StringTokenizer(s);
    int count=0;
    while(st.hasMoreTokens()){

    String s1=st.nextToken();
    char c[]=s1.toCharArray();
    if(c[0]=='[‘){
    continue;
    }
    ++count;
    }
    System.out.println(count);
    }
    }


  • Sandhya

    Question11 in python: a = input()
    target = int(input())
    lst=[int(e) for e in a]
    print(lst.count(target))