I am working on mobile communication Simulator based on C language. I have two different IPs which are stored as Strings in different format.
Now, I need to compare both for one algorithm. but I am confused that how should I do them as both are different arrays. Is there any way to compare both 1D with 2D array ?
#include <string.h>
...
for ( int i = 0; i < num_users; i++ )
{
if ( strcmp( ABC[i], XYZ ) == 0 )
{
// strings are equal
}
else
{
// strings are not equal
}
}
ABC[i]
is the i
'th string stored in ABC
.