Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions

# Coding Questions Asked in Virtusa

11 / 36

Write a program to check whether given date is valid or not?

Input : 1. DDMMYYYY :: 24092017
2. DDMMYYYY :: 54142017

Output :

|  Strings | | | |  Fresher

Tags:Virtusa

12 / 36

Write a function maxsubstring (str,alpha,theta) str is the source string and have to return maximum sub string which starts with alpha and ends
with theta.

Input : NA

Output : NA

|  Strings | | | |  Fresher

Tags:Virtusa

13 / 36

You have a job in which you have to take time stamps and store them. So Write a data structure that can minimize the storage requirements of Year, Month, Date, Hour, Minute.

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:Virtusa

14 / 36

Write a program to find the four digit numbers, which are perfect squares, and all the digits in that number are even.

Input : NA

Output : NA

|  Strings | | | |  Fresher

Tags:Virtusa

15 / 36

Start from a random number, generate a sequence such that if number is odd multiply it 3 and add 1. If number is even, divide the number by 2. This Sequence will always cyclic with 4, 2, 1. In this sequence, find the maximum power of 2 generated in the sequence and print only the power, not the sequence.

Input : NA

Output : NA

|  Hashing | | | |  Fresher

Tags:Virtusa

16 / 36

Start with a random 2 digit number, The series is generated by multiplying the number by 2 and placing the last 2 digits as the next number. Series continues until one of the element repeats.

Input : NA

Output : NA

|  Hashing | | | |  Fresher

Tags:Virtusa

17 / 36

Write a program to print all the four digit numbers whose squares must have all the even digits.

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:Virtusa

18 / 36

Write a program to print the pyramid up to the passed integer value.

1
2 3
4 5 6
7 8 9 10
11 12 13 . .

If we pass the value 13 it should print like the above (no need to print the 3 dots)

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:Virtusa

19 / 36

Write a function which takes one string S, one character X, one more Character Y, which should return the longest substring in the String S, which starts with the X and ends with Y?

Input : NA

Output : NA

|  Strings | | | |  Fresher

Tags:Virtusa

20 / 36

Write a program to accept two time stamps in the given format HH:MM:SS using apropriate datatypes and find the difference between the time stamps in seconds.

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:Virtusa

+ Contribute Programming Qs.

Baig
1