I am beginner in C programming and I am studying on Linked Lists. I am trying to create a Linked List which is gonna display the letters in correct order. The program enables the user to insert a character in the list in alphabetical order or to delete a character from the list. So, I follow an example to a point but there is something that I cannot understand.
Here is the first part of the code:
#include <stdio.h>
#include <stdlib.h>
struct listNode {
char data;
struct listNode *nextPtr;
};
typedef struct listNode ListNode;
typedef ListNode *ListNodePtr;
After that part, program starts with the function prototype.
I know the usage of typedef
in the second line from the bottom.
But what I don't know is, the last line of the code which contains:
typedef ListNode *ListNodePtr;
What does that mean?