palindrome in the array program
Answers
Answered by
0
Answer:
C Program to check if an Array is Palindrome or not. Given an array arr[] of any size n, our task is to find out that the array is palindrome or not. Palindrome is a sequence which can be read backwards and forward as same, like: MADAM, NAMAN, etc.
Explanation:
hope it helps for you .please do follow me . please mark me as brainliest
Answered by
1
Answer:
Program to check if an Array is palindrome or not
- Initialise flag to unset int flag = 0.
- Loop the array till size n/2
- In a loop check if arr{i}!=arr[n-i-1]then set the flag = 1 and break.
- After the loop has ended , if flag is set the print "Not palindrome " else print ".palindrome ".
HOPE IT'S HELP YOU ❤❇
Similar questions