Tcs Coding Questions 2021 [ Reliable ]

Note: In some 2021 drives, TCS asked : one easy (array/string manipulation) and one medium (logic/math/DP).

int main() int n, i, sum = 0; scanf("%d", &n); Tcs Coding Questions 2021

System.out.println(count);

Example: Input: name@1234password → Output: namepassword@ (only letters and special characters extracted) Note: In some 2021 drives, TCS asked :

public class Main static String Result(String s) String alphabets = "", specialCharacter = ""; for(int i = 0; i < s.length(); i++) return alphabets + specialCharacter; Given an order for candies, update the JAR count

: Given a number (up to 100 digits), find the difference between the sum of digits at odd and even positions. Jar of Candies : A JAR has a capacity . Given an order for candies, update the JAR count. If

Given a number N , write a program to obtain a number M by reversing the digits of N . If M contains trailing zeros, they must be removed (which happens naturally during integer reversal).