I have written the below code to find whether the string is a palindrome or not. In this, what i am trying to do is, first i reversing the string being stored in char 'a' and storing that reversed string in char 'b', but i am getting the error "Array must be initialized with a brace enclosed initializer" for char 'b'. Can someone please tell me what is wrong with my code and why i am getting the above error.
Code:
#include<stdio.h>
#include<string.h>
int main()
{
char a[100];
scanf("%s",&a[100]);
char b[100] = strrev(a);
if(a[100]=b[100])
{
printf("It is a palindrome");
}
else
{
printf("It is not a palindrome");
}
}