Tcs Coding Questions 2021 📌

Master the TCS NQT 2021 Coding Round: Most Frequently Asked Questions & Solutions Getting into Tata Consultancy Services (TCS)

Accept a string and an integer K . Shift every character in the string K positions forward in the alphabet. (Assume the string contains only lowercase alphabets). If the shift goes past 'z', wrap around to 'a'.

1210 → 1 zero, 2 ones, 1 two, 0 threes → Yes. 2020 → 2 zeros, 0 ones, 2 twos, 0 threes → Yes? Wait, check: In 2020, digits: 2,0,2,0.

Premium technical roles working on advanced technologies like IoT, AI/ML, and Big Data. Coding Difficulty: Medium to Hard. Tcs Coding Questions 2021

Given a hexadecimal-like string where characters range from A to G (representing values 10 to 16) and digits 0 to 9 , convert the given base-17 string into its decimal equivalent. Input: 1A Output: 31 (Since

Example: Input: name@1234password → Output: namepassword@ (only letters and special characters extracted)

s = input() print(remove_consecutive_duplicates(s)) Master the TCS NQT 2021 Coding Round: Most

1 question to be solved in 15–30 minutes, focusing on basic logic and data types. Advanced Coding:

If all trainees are unfit (average < 70), display "All trainees are unfit".

Wait—The actual TCS 2021 version was simpler: Replace all non-overlapping "WWW" with "F". But overlapping should remain. If the shift goes past 'z', wrap around to 'a'

int main() int Array[] = 1, 2, 3, 4, 5; int N = sizeof(Array)/sizeof(Array[0]); int K = 2; vector<int> ans = rotate(Array, N, K); for (int i = 0; i < N; ++i) cout << ans[i] << ' ';

Ultimate Guide to TCS Coding Questions 2021 Tata Consultancy Services (TCS) is one of the largest IT service providers in the world. Every year, hundreds of thousands of engineering students and professionals take the TCS National Qualifier Test (NQT) or the TCS Digital exam to secure a role. The 2021 recruitment drive saw a significant shift toward automated coding assessments testing core programming capabilities, problem-solving skills, and data structures.



































Free site counter


































Free site counter


































Free site counter