Discussion :: Arrays
-
What will be the output of the following program?
void main()
{
char str1[] = "abcd";
char str2[] = "abcd";
if(str1==str2)
printf("Equal");
else
printf("Unequal");
}
Answer : Option B
Explanation :
Strings are compared using strcmp() function defined under string.h header file.
Be The First To Comment