Binary AND operation

Hi Guys,

I have a situation, I want to perform a AND operation which is basically to get the next HOP IP. My IP and netmask are stored in a char array. Can someone please tell me how to perform AND on two char arrays?

1
2
3
4
char arr[] = "192.168.1.102";
char brr[] = "255.255.255.0"; 

// Perform AND operation of the above two 


Thanks in advance
if we do it manually what output it should give??
because i am not able to understand what you want to do!!
Convert to integral quantity by using inet_aton and then use bitwise AND.

However, I'm not quite sure what you are trying to do.
Never-mind it is solved guys. Thanks for the reply thou.
Topic archived. No new replies allowed.