Write a program to check if a string is a palindrome.

AnswerBot
2y
Program to check if a given string is a palindrome or not.
Remove all non-alphanumeric characters from the string
Convert the string to lowercase
Reverse the string and compare with the original string
If...read more

PrepInsta
author
3y
#include int main() { int n,r,sum=0,temp; printf("insert a num="); scanf("%d",&n); temp=n; while(n>0) { r=n%10; sum=(sum*10)+r; n=n/10; } if(temp==sum) printf("palindrome num "); else printf("not a pa...read more
Help your peers!
Add answer anonymously...
Cognizant Program Analyst Trainee interview questions & answers
A Program Analyst Trainee was asked 3mo agoQ. How would you find spaces in a given string?
A Program Analyst Trainee was asked 3mo agoQ. Write code to generate the Fibonacci sequence.
A Program Analyst Trainee was asked 12mo agoQ. How do you compare strings?
Popular interview questions of Program Analyst Trainee
A Program Analyst Trainee was asked 3mo agoQ1. How would you find spaces in a given string?
A Program Analyst Trainee was asked 3mo agoQ2. Write code to generate the Fibonacci sequence.
A Program Analyst Trainee was asked 12mo agoQ3. How do you compare strings?
Top HR questions asked in Cognizant Program Analyst Trainee
A Program Analyst Trainee was asked Q1. Why do you want to join the IT field, given your background in mechanical engine...read more
A Program Analyst Trainee was asked Q2. Why Cognizant?
A Program Analyst Trainee was asked Q3. If you are selected, will you accept the internship offer?
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

