What's happening is that it gets to the part where it says "Enter the ID:" and when I enter any number whatsoever it causes the error and crashes.
char *name = (char*)malloc(50), *job = (char*)malloc(1000);
int id, info;
puts("Enter the ID:");
puts("Enter employee name:");
puts("Enter employee's duty:");
info = writeinfo(name,id,job); /* This function is contained in a header file of mine
but I don't think it has anything to do with the error anyway */