• + 0 comments

    Hi,

    In Node* temp = headB,

    we are not allocating any memory to temp. therefore if headB value changes to headB.next then temp value has to change to same value as temp and headB are pointing to same address. Can you explain why it is not changing.