I was trying to implement linked list in C++, when this idea struck my mind. With standard node definition as
class node {
public:
int data;
node *next;
};
I created an empty list node *head;
then tried this
if(head->next == nullptr)
cout<<"Stores nullptr";
if(! head->next)
cout<<"Returns bool values";
But there is no output, so what is stored inside head->next
?