Harry
BAN USER'p' is a pointer to "an array of 2 ints" when we try to do any arithmetic operations on 'p' the type of p is considered. When we increment 'p' by 1 (say p++) it point to next set of array of two ints(a single ++ will make pointer jump of two int locations in memory). 'pint ' is just a int pointer pint++ will jump a single int location. Basically we are doing type conversion here.
Pointer to an Array : is a single pointer which points to the first element of an array, the array name is a pointer to that array.
Array of Pointers: an array having Pointers in it.
a bit-wise operator considers each bit in the operand and a logical operator considers operand as a single.
if you perform logical OR on 3 and 4 the result will be 1 that is true as said in earlier reply
the bit-wise OR will give you a different result
3(011) logically ORed with 4(100) will give you 7(111)
We will need two pointers 'fast' and 'slow' to iterate the list.
- Harry June 20, 2014fast=fast->next->next;
slow=slow->next;
conditions to check
1. if (fast->next==slow) //the list has odd number of nodes.
2. if (fast->next->next==slow) //the list has even number of nodes.
Now we have pointer to middle node and a pointer to last node.
check if the node to be deleted is before or after the middle node or its middle node or last node.Proceed with deletion and update the list accordingly ( even and odd criteria as stated in problem)