TCS Ninja Hands On Coding Questions with Solutions

Get Prepinsta Prime

Get all 200+ courses offered by Prepinsta

Never Miss an OffCampus Update

Get OffCampus Updates on Social Media from PrepInsta

Follow us on our Media Handles, we post out OffCampus drives on our Instagram, Telegram, Discord, Whatsdapp etc.

Get Hiring Updates
Amazon,Google,Delottie & 30+companies are hiring ! Get hiring Updates right in your inbox from PrepInsta

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Get PrepInsta Prime Subscription

Get access to all the courses that PrepInsta offers, check the out below -

Companies

TCS, Cognizant, Delloite, Infosys, Wipro, CoCubes, KPMG, Amazone, ZS Associates, Accenture, Congnizant & other 50+ companies

Programming

Data Structures, Top 500 Codes, C, C++, Java Python & other 10+ subjects

Skills

Full Stack Web Development, Data Science, Machine Learning, AWS Cloud, & other 10+ skills and 20+ projects

OffCampus Updates

Never Miss OffCampus Updates

Get OffCampus Update from PrepInsta

Follow us on our Social Media Handles

TCS Ninja 2022 Hands on Coding Questions

TCS Ninja 2022 hands-on coding questions answers  with pattern has been announced as a part of TCS Test. TCS Ninja Hands on Coding Questions Paper with Solutions are given here on this page. Also, you will find TCS ninja coding questions with solved papers. There are 2 questions that you need to solve in 45 mins(30 + 15 mins)

  • No Of Questions:- 2 Question(1 Easy + 1 Hard)
  • Time – 45 mins(15 mins + 30  mins)
IMPORTANT NOTE:
  1. There will be no negative marking.
  2. TCS NQT is adaptive this year
  3. You will not get any extra rough paper in the exam as a calculator and Rough Paper will be available on your Desktop Screen. You are not allowed to move your eyes down while giving the examination.
Coding Question For
TCS Ninja
Number of Questions2
Time Allotted45 Mins
Negative MarkingNo
Cut Off
Positive Testcases are Necessary

Marking Scheme for TCS Hands on Coding Questions

Coding Marks
Marks
Type
0 Test Case
0 Marks
NA
1 Test Case
5 Marks
Shown
2 Test Case
8 Marks
Shown
3 Test Case
12 Marks
Hidden
4 Test Case
18 Marks
Hidden
5 Test Case
22 Marks
Hidden

Program 1

Word is the Key

Word is the Key 💖 (Link to this question)

 

One programming language has the following keywords that cannot be used as identifiers:

break, case, continue, default, defer, else, for, func, goto, if, map, range, return, struct, type, var

Write a program to find if the given word is a keyword or not

Test cases

Case 1

  • Input – defer
  • Expected Output – defer is a keyword

Case 2

  • Input – While
  • Expected Output – while is not a keyword

Program 2

Sweet Seventeen

Sweet Seventeen 💖 (Link to this question)

 

Given a maximum of four digit to the base 17 (10 – A, 11 – B, 12 – C, 13 – D … 16 – G} as input, output its decimal value.

Test Cases

Case 1

  • Input – 1A
  • Expected Output – 27

Case 2

  • Input – 23GF
  • Expected Output – 10980

Program 3

Oddly Even

The Oddly even 💖 (Link to this question)

 

Problem

Given a maximum of 100 digit numbers as input, find the difference between the sum of odd and even position digits

Test Cases

Case 1

  • Input: 4567
  • Expected Output: 2

Explanation : Odd positions are 4 and 6 as they are pos: 1 and pos: 3, both have sum 10. Similarly, 5 and 7 are at even positions pos: 2 and pos: 4 with sum 12. Thus, difference is 12 – 10 = 2

Case 2

  • Input: 5476
  • Expected Output: 2

Case 3

  • Input: 9834698765123
  • Expected Output: 1

Program 4

Prime Number with a Twist

Ques. Write a code to check whether no is prime or not. Condition use function check() to find whether entered no is positive or negative ,if negative then enter the no, And if yes pas no as a parameter to prime() and check whether no is prime or not?

 

Program 5

Leap Year or not

Program to check if a year is Leap Year or not 💖

 

The Words Like “Placement Papers” and “Previous Year Papers” are used here for Google Search Purposes only and may not be. All these questions could be freely available on the internet, we are only charging students for the PrepInsta’s Mock Test experiences and Analytics as well as preparation for the exam. Prepinsta does not guarantee any recurrence of the questions in the exam however we believe that from our practise questions the exam should atleast be similar in pattern as per syllabus or difficulty. These are only practise mock questions. PrepInsta has compiled these from various internet sources and made them as per mock experience for students ease and are offering analytics as per performance

Comments