Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

compare two strings without using strcmp in C

#include<stdio.h>
void main()
{
int a=compare("forgetcode","FORGETCODE");
if(a==0)
{
}else
{
}
}
int compare(char a[], char b[])
{
   int c = 0;
 
   while( a[c] == b[c] )
   {
      if( a[c] == '\0' || b[c] == '\0' )
         break;
      c++;
   }
   if( a[c] == '\0' && b[c] == '\0' )
      return 0;
   else
      return -1;
}