Take FREE!! Online Cocubes Mock Test to Crack various Companies Written Exams.
Practice List of Paytm Coding Questions !!!
Take 30+ FREE!! Online Arithmetic Aptitude Mock test to crack any Exams.

Program Discussion :: Basics

Home > Programs > Basics

10 / 272

Write a program to find string is palindrom or not.

Answer:

#include 
using namespace std;

int main(){
    char string1[20];
    int i, length;
    int flag = 0;
    
    cout > string1;
    
    length = strlen(string1);
    
    for(i=0;i < length ;i++){
        if(string1[i] != string1[length-i-1]){
            flag = 1;
            break;
       }
    }
    
    if (flag) {
        cout 

Asked In :: IBM PEOL

Post Your Answer Here:

Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here: