Sunday, 7 November 2021

TCS Test

TCS Test Sample Questions

Below are the question pattern asked 
  • Verbal Ability - 20 Questions
  • Numerical Ability - 15 Questions
  • Reasoning Ability - 15 Questions
  • Hands On Coding Exercise - 2 Questions


Sample Coding Questions

Question1

Given a number, return UNO if sum of its digits its recursively ends up into 1 else NOT UNO

Solution


Question2

Aircrafts are equipped with auto pilot system. One of the input is a string of literal containing the direction.
Find if the jet plane returns to the same position on the base where it took off.

Each direction changes at an interval of 1 min (1 <= i <= N), where N is number of directions (N, W, E, S)
Output "Returned successfully" if the plane returns to the starting position else "Not returned successfully"

Example1
NESW
Returned successfully

Example2
NNWESW
Not returned successfully

Solution

No comments :

Post a Comment