Getting Started With C

Comparison of Two Strings

Resources :

Featured
Special title treatment

With supporting text below as a natural lead-in to additional content.

Q1.

What will be the output of the program ?
#include
int main()
{
char str1[] = "Hello";
char str2[] = "Hello";
if(str1 == str2)
printf("Equal\n");
else
printf("Unequal\n");
return 0;
}

Q2. If the two strings are identical, then strcmp() function returns