Explore
ProGrad Programs
Placement Prep
TCS Codevita
Live Placement Training
Live Aptitude Training
Live Programming Training
Webinars
About Us

Edit
Reply




Edit

Wipro Coding Questions for Wipro NLTH 2020 | Wipro Programming questions (Automata)

Published on 15 Sep 2019

Wipro coding test consists of 2 questions. These Wipro coding questions need to answered in 60 minutes. Wipro coding questions are asked in both Wipro on-campus and off-campus drives. For more details regarding Wipro recruitment process, check here.

Wipro coding questions range from easy to difficult level. Out of the 2 questions asked in Wipro coding test, one is easy and the other is slightly difficult. You need to answer a minimum of 1 question, to clear the cutoff. But in certain cases, if a lot of students have cleared all test cases for both the questions, then the cutoff might vary accordingly.


You can also check



Wipro Coding questions rules


wipro coding questions and instructions


Wipro Coding questions with answers


Wipro coding questions are taken from Amcat Automata questions. So make sure you practice Wipro previously asked coding questions and Amcat Automata questions as well. These will give you enough idea about the pattern of questions asked.


Most asked Wipro coding questions



Note: Wipro focuses on Pattern Printing programs. So if you want to practice all the pattern programs, then click here.


Wipro NLTH 2018 questions with solutions



Wipro pattern programs with solutions 2019


Question 1:


Print the below pattern (half diamond using numbers)


Input:

       3 4


Output:

        3

       44

       555

       6666

       555

       44

       3


Input :

       4 4


Output:

       4

       55

       666

       7777

       666

       55

       4


Program:

#include
int main()
{
  int i,j,s,N,count=0;
  scanf(“%d%d”,&s,&N);
  for(i=s;count<4;count++)
  {
    for(j=0;j<count+1;j++)
      printf(“%d”,i);
    printf(“\n”);
    i=i+1;
  }
  for(i=s+N-2;count>0;count–)
  {
    for(j=0;j<count-1;j++)
      printf(“%d”,i);
    printf(“\n”);
    i=i-1;
  }
  return 0;
}


Question 2:


Print the following pattern (half diamond using numbers)


Input :

3


Output:

1

2*2

3*3*3

3*3*3

2*2

1


Input :

4


Output:

1

2*2

3*3*3

4*4*4*4

4*4*4*4

3*3*3

2*2

1


Program:

#include
int main()
{
  int i,j,k,N,count=0;
  scanf(“%d”,&N);
  for(i=1;i<=N;i++)
  {
    k=1;
    for(j=0;j<i;j++)
    {
      printf(“%d”,i);
      if(k<i)
      {
        printf(“*”);
        k=k+1;
      }
    }
    printf(“\n”);
  }
  for(i=N;i>0;i–)
  {
    k=1;
    for(j=0;j<i;j++)
    {
      printf(“%d”,i);
      if(k<i)
      {
        printf(“*”);
        k=k+1;
      }
    }
    printf(“\n”);
  }
  return 0;
}


Question 3:


Print the below pattern.


Input:

4


Output:

1

2*3

4*5*6

7*8*9*10

7*8*9*10

4*5*6

2*3

1


Program:

#include
int main() {
 int i,j,count=1,n;
 printf(“Enter a number\n”);
 scanf(“%d”,&n);
 for(i=1;i<=n;i++)
 {   
for(j=1;j<=i;j++)
    {
      if(j<i)
      printf(“%d*”,count++);
      else
      printf(“%d”,count++);
    }        printf(“\n”);
   }
count=count-n;
 for(i=n;i>=1;i–)
  {       for(j=1;j<=i;j++)
    {
      if(j<i)
      printf(“%d*”,count++);
      else
      printf(“%d”,count++);
    }
    count=(count+1)-2*i;
    printf(“\n”);
   }
  return 0;
 }


Question 4:


Print the following pattern.


Input: 

3 4


Output:

3

44

555

6666

6666

555

44

3


Program:

#include<stdio.h>
int main()
{
  int i,j,s,N,count=0;
  scanf(“%d%d”,&s,&N);
  for(i=s;count<4;count++)
  {
    for(j=0;j<count+1;j++)
      printf(“%d”,i);
    printf(“\n”);
    i=i+1;
  }
 for(i=s+N-2;count>0;count–)
  {
    for(j=0;j<count-1;j++)
      printf(“%d”,i);
    printf(“\n”);
    i=i-1;
  }
  return 0;
}


Question 5:


Print the below pattern.


Input:

5


Output:

1

3*2

4*5*6

10*9*8*7

11*12*13*14*15


Program:

#include<stdio.h>
int main()
{
  int i,j,k,l=1,N,d,r,count=0;
  scanf(“%d”,&N);
  for(i=1;i<=N;i++)
  {
    k=1;
    d=i%2;
    r=l+i-1;
    for(j=0;j<i;j++)
    {
 if(d==0)
      {
        printf(“%d”,r);
        r–;
        if(k<i)
        {
          printf(“*”);
          k=k+1;
        }
        l++;
        continue;
      }
      printf(“%d”,l);
      l++;
      if(k<i)
      {
        printf(“*”);
        k=k+1;
      }
    }
    printf(“\n”);
  }
  return 0;
}


Question 6:


Print the below pattern.


Input:

4


Output:

1*2*3*4*17*18*19*20

– -5*6*7*14*15*16

– – – -8*9*12*13

– – – – – -10*11


Program:

#include<stdio.h>
void pattern(int);
int main()
{
        int n;
       scanf(“%d”, &n);
       pattern(n);
       return 0;
}
void pattern(int n)
{       
       int i, j, k, s, a = 1,b = n*n + 1;
       for (i = n; i >= 1; i–) {           
               for (s = 0; s < n – i; s++)
                      printf(“–“);
               for (j = 0; j < i; j++)
                      printf(“%d*”, a++);
               for (k = 0; k < i – 1; k++)
                      printf(“%d*”, b++);
               printf(“%d\n”, b);        // last b should without *
               b -= 2*(i – 1);
       }       
}


Question 7:


Print the below pattern.


Input:

3


Output:

3 3 3

3 1 3

3 2 3

3 3 3


Program:

#include<stdio.h>
int main()
{
  int i, j, n, c=1;
  scanf(“%d”, &n);
  for(i=1; i<=n+1; i++)
  {
    for(j=1; j<=n; j++)
    {
      if(i!=1 && j==n-1)
      {
      printf(“%d “, c);
               c++;
      }
      else
      printf(“%d “, n);
        }
          printf(“\n”);
         }
        return 0;
}


Practice more Pattern Programming Questions


Practice more C Programming Questions


Video on Wipro Coding Questions



If you have any feedback about this article and want to improve this, please write to enquiry@faceprep.in