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

# Coding Questions Asked in TCS

1 / 25

Write a program to print next to the last word of a sentence.

Input : What is your name

Output :

|  Basics | | | |  Experience

Tags:IBM TCS Virtusa

2 / 25

Write an efficient program to covert decimal number into binary number

Input : NA

Output : NA

|  Bitwise Operator | | | |  Fresher

Tags:TCS

3 / 25

Write code for swapping two variables without using 3rd variable.

Input : NA

Output : NA

|  Basics | | | |  Fresher

4 / 25

Write a program to print prime numbers upto 10.

Input : NA

Output : NA

|  Basics | | | |  Fresher

5 / 25

Write a program to print the nth fibonacci number.

Input : NA

Output : NA

|  Basics | | | |  Experience

6 / 25

Write a program to print odd number in descending order from 1-10.

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:TCS

7 / 25

Write a Program to generate random numbers.

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:TCS

8 / 25

Write a program using command line argument to input a word and check whether it is palindrome or not.

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:TCS

9 / 25

Write a C program which will check whether a given number N is prime or not.

If the number N is prime, then find its square root and print that value to stdout as floating point number with exactly 2 decimal precision.

If the given number N is not prime, then print the value 0.00 to stdout.

The given number N will be a positive non Zero integer and it will be passed to the program using the first command line parameter. Other than the floating point result, no other information should be printed to stdout.

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:TCS

10 / 25

Write a program using command line argument to input two number and Calculate the Sum of numbers.

Input : NA

Output : NA

|  Basics | | | |  Fresher

Tags:TCS

+ Contribute Programming Qs.

Baig
1