/* * Author : Amit Dutta * Date : 08 Feb 2026 * Repo : https://github.com/notamitgamer/bsc * License : MIT License (See the LICENSE file for details) */ /* If an array arr contains n elements, then write a program to check if arr[0] = arr[n-1], arr[1] = arr[n-2] and so on. */ /* Let Us C, Chap- 13 (Arrays), Qn No.: B(b) */ /* This file is auto-generated by a bot. */ /* This code is not compiled; it is for reference only. */ #include #include #include int main() { int arr[100], n, i, symmetric = 1; printf("Enter number of elements (n): "); scanf("%d", &n); printf("Enter %d elements: ", n); for (i = 0; i < n; i++) { scanf("%d", &arr[i]); } // Check symmetry for (i = 0; i < n / 2; i++) { if (arr[i] != arr[n - 1 - i]) { symmetric = 0; break; } } if (symmetric) printf("\nThe array is symmetric (Palindrome).\n"); else printf("\nThe array is NOT symmetric.\n"); return 0; }