I dont know about anything else but remove the '&' from the 2nd and 3rd scanf() calls.
Code:
scanf("%s",fname);
scanf("%s",lname);