Page 1 of 1

2. Write a C++ program that determines if an integer array is a palindrome. Declare two pointers to the array. One point

Posted: Wed Apr 27, 2022 3:39 pm
by answerhappygod
2 Write A C Program That Determines If An Integer Array Is A Palindrome Declare Two Pointers To The Array One Point 1
2 Write A C Program That Determines If An Integer Array Is A Palindrome Declare Two Pointers To The Array One Point 1 (37.85 KiB) Viewed 35 times
2. Write a C++ program that determines if an integer array is a palindrome. Declare two pointers to the array. One pointer points to the starting of the array, another points to the end of the array. Using these pointers determine whether the array is a palindrome. Increment the pointer, which points to the starting of the array, and decrement the pointer which points to the end of the array. The program should ask the user to enter the array size, and then creates an integer array dynamically using the entered size. The user is then asked to fill the array, which is then checked as mentioned earlier. Remember to delete the dynamic array before exiting the program.