what should be the conditon used for checking whether the string is a palindrome or not by using 2 variables in a for loop ?

The condition is that the string with all its letters reversed is the same. Alternatively, for each position i in the string letter at i = letter at (length -i)

commented: +1 for balance. +11
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.