Strings as char Arrays
In this lab, you will continue exploring the use of for loops,particularly regarding iterating through the elements of a chararray.
EXAMPLE PROGRAM
The sample program this week declares a char array and uses itto store user string input. Once the input is stored in the array,we first use a for loop to counter the number of characters thatthe user input (by looping until we see the null character, ).Once we know the length of the string entered, we use another forloop to test if the input is a palindrome (the same backward andforward).
#include <stdio.h>#define SIZE 5 int main(){
OR
OR