Get Off-Campus Placement Jobs Info !!!
Programs asked in Mettl Coding Round
Click To Practce List of Programs asked in Nagarro !!!

Program Discussion :: Basics

Home > Programs > Basics

11 / 248

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: