Your
first
pointer is invalid because it is initialised with an indeterminate value:
alphabets first, temp;
alphabets tempfirst=(alphabets)malloc(sizeof(struct alphanode));
tempfirst->linkA=NULL;
tempfirst->linkB=NULL;
first=temp;
enterAlpha("bcd", first);
displayMyDictionary(first);
Better code would do something like this:
#include <assert.h>
int main()
{
alphabets first = NULL;
alphabets temp = NULL;
}
void enterAlpha(char str[], alphabets first)
{
assert(str != NULL);
assert(first != NULL);
if (NULL == first)
return;
}