I was going through a book studying Linked list and saw these lines
if( *head == NULL){
}else if ( (*head)->next == (node *) NULL ){
}
what is the difference between NULL and (node *) NULL can they be used interchangeably?
typedef struct nodeType{
int info;
struct nodeType *next;
}node;
When comparing pointers, types are not considered, so it is pointless.
The author likely just included it for clarity if it’s an introductory book. If it’s not an introductory book, then the author either has an odd coding style, or somehow thinks that it’s more meaningful.