Wipro coding questions | Wipro Programming questions (Automata)

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. Recently this round has been introduced in Wipro Elite National Talent Hunt for 2019 graduates. 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.

Prepare smart with Wipro’s Most Important Concepts & Questions for Wipro Recruitment here.

wipro coding questions and wipro automata programming questions

Highlights of the course:
1. An intensive 40 hr online program
2. Covers all most repeated questions from Verbal, Analytical and Coding section
3. Advanced concepts like Greedy algorithms, String Matching, Divide & Conquer are dealt in-detail with easy-to-understand explanations
4. The program is designed as per the latest Wipro’s recruitment pattern

 

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;
}

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;
}

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;
 }

Print the following pattern.

Input: 
3  4
Output:
3
44
555
6666
6666
555
44
3

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;
}

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;
}

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);
              }            
}

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;
}