Get Off-Campus Placement Jobs Info !!!
Programs asked in Mettl Coding Round
Click To Practce List of Programs asked in Nagarro !!!

# Wipro Placement Questions & Answers :: Wipro

238.36K

## Total Qs: 339+

NA
SHSTTON
16
Solv. Corr.
46
Solv. In. Corr.
62
Attempted
0 M:0 S
Avg. Time

331 / 339

Choose the correct option.

In an election contested by two parties, Party D secured 12% of the total votes more than Party R. If party R got 132,000 votes, by how many votes did it lose the election?

A46000

B33000

C16000

D36000

| | Important Formulas | Topic: | Asked In |

Explanation:

Let the percentage of the total votes secured by Party D be x%
Then the percentage of total votes secured by Party R = (x â€“ 12)%
As there are only two parties contesting in the election, the sum total of the votes secured by the
two parties should total up to 100%
i.e., x + x â€“ 12 = 100
2x â€“ 12 = 100
or 2x = 112 or x = 56%.
If Party D got 56% of the votes, then Party got (56 â€“ 12) = 44% of the total votes.
44% of the total votes = 132,000 i.e. 44/100 * T = 132,000
T = (132000 * 100)/44 = 300000 votes.
The margin by which Party R lost the election = 12% of the total votes
= 12% of 300000 = 36000.

Tags: Wipro

NA
SHSTTON
88
Solv. Corr.
157
Solv. In. Corr.
245
Attempted
0 M:31 S
Avg. Time

332 / 339

Choose the correct option.

The G.C.D. of 1.08, 0.36 and 0.9 is:

A0.03

B0.9

C0.18

D0.108

| | Important Formulas | Topic: | Asked In 1 |

Explanation:

Given numbers are 1.08 , 0.36 and 0.90
H.C.F of 108, 36 and 90 is 18 ( G.C.D is nothing but H.C.F)
So H.C.F of given numbers = 0.18

NA
SHSTTON
89
Solv. Corr.
127
Solv. In. Corr.
216
Attempted
1 M:46 S
Avg. Time

333 / 339

Choose the correct option.

Structure can be used

ATo hold different datatypes

BHave pointers to structure

CTo assign to one another

DAll the above

| | Topic: | Asked In |

Explanation:

Here is no explanation for this answer

Tags: Nagarro TCS Wipro

NA
SHSTTON
1
Solv. Corr.
2
Solv. In. Corr.
3
Attempted
0 M:0 S
Avg. Time

334 / 339

Choose the correct option.

In which of the following cases dynamic arrays are not preferred?

AIf the array holds less number of elements

BIf the size of the array is unknown

CIf the size of the array changes after few iterations

DIf the memory reallocation takes more time i.e. expensive

| | Topic: | Asked In Wipro |

Explanation:

Dynamic arrays are preferred when the size of the array is unknown during memory allocation or the size changes after few iterations or the memory reallocation is expensive. If array holds less number of elements, the physical size is reduced and reduction takes more time. In that case, we can use normal arrays instead of dynamic arrays.

Tags: Wipro

NA
SHSTTON
20
Solv. Corr.
18
Solv. In. Corr.
38
Attempted
0 M:0 S
Avg. Time

335 / 339

How would you store an element in a sparse matrix?
``````<b>I.</b> public void store(int row_index, int col_index, Object val)
{
if (row_index < 0 && row_index > N)
{
System.out.println("column index out of bounds");
return;
}
if (col_index < 0 && col+index > N)
{
System.out.println("row index out of bounds");
return;
}
sparse_array[row_index].store(col_index, val);
}

<b>II.</b> public void store(int row_index, int col_index, Object val)
{
if (row_index < 0 || row_index > N)
{
System.out.println("row index out of bounds");
return;
}
if (col_index < 0 || col+index > N)
{
System.out.println("column index out of bounds");
return;
}
sparse_array[row_index].store(col_index, val);
}

<b>III.</b> public void store(int row_index, int col_index, Object val)
{
if (row_index < 0 || row_index > N)
{
System.out.println("column index out of bounds");
return;
}
if (col_index < 0 || col+index > N)
{
System.out.println("row index out of bounds");
return;
}
sparse_array[row_index].store(col_index, val);
}

<b>IV.</b> public void store(int row_index, int col_index, Object val)
{
if (row_index < 0 && row_index > N)
{
System.out.println("row index out of bounds");
return;
}
if (col_index < 0 && col+index > N)
{
System.out.println("column index out of bounds");
return;
}
sparse_array[row_index].store(col_index, val);
}``````

AI

BII

CIII

DIV

| | Topic: | Asked In Wipro |

Explanation:

Each row in a sparse matrix acts as a sparse array, hence this row with the specified col_index is the array and the specified position where the element is stored.

Tags: Wipro

NA
SHSTTON
1
Solv. Corr.
0
Solv. In. Corr.
1
Attempted
0 M:0 S
Avg. Time

336 / 339

Choose the correct option.

What is the time complexity of the code that uses self balancing BST for determining the number of inversions in an array?

AO(n log n)

BO(n2)

CO(n)

DO(log n)

| | Topic: | Asked In Wipro |

Explanation:

When a self balancing BST like an AVL tree is used to calculate the number of inversions in an array then the time complexity is O(n log n) as AVL insert takes O(log n) time.

Tags: Wipro

NA
SHSTTON
22
Solv. Corr.
27
Solv. In. Corr.
49
Attempted
0 M:0 S
Avg. Time

337 / 339

Choose the correct option.

Which of the following is the predefined function for array reversal in javascript?

Arev()

Breverse()

Carr_reverse()

Darray_reverse()

| | Topic: | Asked In Wipro |

Explanation:

The predefined function for reversing an array is reverse() in javascript. It does not requires any argument.

Tags: Wipro

NA
SHSTTON
11
Solv. Corr.
11
Solv. In. Corr.
22
Attempted
0 M:0 S
Avg. Time

338 / 339

What will be the output of the following code?
``````#include <bits/stdc++.h>
using namespace std;

int min(int x, int y)
{ return (x < y)? x: y; }

int func(int arr[], int n)
{

int *jump = new int[n];
int i, j;

if (n == 0 || arr == 0)
return INT_MAX;

jump = 0;

for (i = 1; i < n; i++)
{
jump[i] = INT_MAX;
for (j = 0; j < i; j++)
{
if (i <= j + arr[j] && jumps[j] != INT_MAX)
{
jump[i] = min(jump[i], jump[j] + 1);
break;
}
}
}
return jump[n-1];
}

int main()
{
int arr[] = {1, 3, 6, 1, 9,7};
int size = sizeof(arr)/sizeof(int);
cout<< func(arr,size);
return 0;
}``````

Aerror

B1

C2

D3

| | Topic: | Asked In Wipro |

Explanation:

The given code finds the minimum number of steps required to reach the end of the array by using dynamic programming. So the output will be 3.

Tags: Wipro

NA
SHSTTON
22
Solv. Corr.
193
Solv. In. Corr.
215
Attempted
0 M:0 S
Avg. Time

339 / 339

Choose the correct option.

Reference bit is used for

AImplementing LRU page replacement algorithm

BImplementing NRU algorithm

CTo check the page table entry in the cache memory

DNone of Above

| | Topic: | Asked In | 