← TCS questions

Prime number digit manipulation

Filed under TCS

Given a positive integer `n`, check if it is prime. If it is prime, create a new integer by squaring each of its decimal digits, concatenating the squared values into a single string, and reversing…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related TCS questions

Collected from public candidate posts and coding forums. Updated Nov 2026.