Take FREE!! Online AMCAT Mock Test to Crack Wipro NLTH, Capgemini, etc.
Get Off-Campus Placement Jobs Info !!!
Practice Given Here Wipro NLTH Practice Q&A

# Coding Questions Asked in Virtusa

21 / 36

Write a function to accept a number 'n' and
a)if n is negative then return -1.
b)if n is positive and perfect number then return sqrt(n).
c)if n is positive and not a perfect no. then return n(n+1)/2

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:Virtusa

22 / 36

Write a program to print in the format

1
2 2
3 3 3
4 4 4 4
5 5 5 5 5

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:Virtusa

23 / 36

Write a program to generate the next number (ex:143=1^2+4^2+3^2=26)repeat this sequence till you get 1 or 4.

Input : NA

Output : NA

|  Stack | | | |  Fresher

Tags:Virtusa

24 / 36

Write a program to eliminate duplicates in a sorted array.

Input : NA

Output : NA

|  Array | | | |  Fresher

Tags:Virtusa

25 / 36

Write a recursive function to print 100 Fibonacci numbers.

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:Virtusa

26 / 36

Write a program to Print the Pascal triangle.

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:Virtusa

27 / 36

Write a program to print the angle between the pointers in the wall clock when time is taken as input.

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:Virtusa

28 / 36

Can trees be implemented using arrays? If so, write the program for same.

Input : NA

Output : NA

|  Trees | | | |  Fresher

Tags:Virtusa

29 / 36

Write a Swapping program using XOR operation.

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:Virtusa

30 / 36

Write a program of Circular Queue.

Input : NA

Output : NA

|  Stack | | | |  Fresher

Tags:Virtusa

+ Contribute Programming Qs.

Baig
1