I have this function and it works well, but I was wondering if the usage of getchar is correct. Could I do something else instead? Thanks, guys.
void addRecord (struct record ** start, int account, char name[], char address[ ]);
{
printf("Enter your account number:\n");
scanf("%d", &account);
getchar();
printf("Enter your name:\n");
fgets(name, sizeof name, stdin);
printf("Enter your residential address:\n");
getaddress(address, sizeof address);
}