I am trying to implement a linked list. I am curious about how much space will this node structure take. I tried it with sizeof(node) and got 16 bytes but I had expected 12 bytes as int on my system is 4 bytes and a pointer is 8 bytes.
Note that this is pseudocode.
/*a pseudo c++ file to demonstrate linked list*/
node{
int val;
node *p;
};
linkedlist{
...
...
};