/* strcomp.c */
/* NO bulletproofing for overlong string is included. */
#include <stdio.h>
#include<string.h>

int main()
{
  char string1[51];
  char string2[51];

  printf("You will be asked to enter two strings. The program will then\n");
  printf("compare the strings to see if they are the same.\n\n");
  printf("Enter string 1: ");
  gets(string1);
  printf("Enter string 2: ");
  gets(string2);
  if (!strcmp(string1, string2))
   {
    printf("The strings are the same.\n");
   }
  else
   {
    printf("The strings are different.\n");
   }
  return 0;
}
