What’s wrong with this code which returns xor of two nodes address ? [code] //struct is common userdefined datatype in c/c++ and class

What’s wrong with this code which returns xor of two nodes address ?
Code:
//struct is common userdefined datatype in c/c++ and class is it's alternative
struct node* XOR (struct node *a, struct node *b) 
{
    //this logic is used to fill the nodes with address of a xor linked list
    return  ((int) (a) ^ (int) (b));   
}
A. nothing wrong. everything is fine
B. type casting at return is missing
C. parameters are wrong
D. total logic is wrong
 

Tìm kiếm

Back
Top