Programming In C Practical 18
Programming In C Practical 18 Question 1 Write a program to check string is palindrome or not. Palindrom.cpp C #include<stdio.h> #include<conio.h> void main() { clrscr(); char str[30]; int i=0,j=0,flag=0; printf("nEnter a string: "); scanf("%s",str); while(str[i]!='') { i++; } i–; while(j<=i) { if(str[j]!=str[i]) { flag=1; break; } j++; i–; } if(flag==1) printf("nString is not palindrom"); else
Programming In C Practical 18 Read More »
