#include <stdio.h>
#include <stdlib.h>
int main()
{
char array1 [50];
char array2 [50];
printf("enter a string:\n");
fgets(array1, 50, stdin);
printf("enter a string2:\n");
fgets(array2, 50, stdin);
if (array1==array2){
printf("True");
}
}
If I enter the same string twice this code should print true. However it doesn't. How do I fix this?