OK, lots of things for you to think about here.
As Richard has said, userids and passwords shouldn't be hard coded: it's inflexible, and far, far too easy to just look in the EXE file and see what they are. So use a file to store them instead.
But file storage brings it's own problems: data protection comes into force here as passwords are considered "personal information" and by law in most countries need to be properly protected - which means salting and hashing them rather than storing them in clear text or encrypted, so they can't be "undone" and the original data recovered.
This explains the reasons and the basic process (though it's C# focused not C, it should be pretty obvious):
Password Storage: How to do it.[
^]
And remember: if you have any European Union users then GDPR applies and that means you need to handle passwords as sensitive data and store them in a safe and secure manner. Text is neither of those and the fines can be .... um ... outstanding. In December 2018 a German company received a relatively low fine of €20,000 for just that.
When that's dealt with, "forgotten passwords" can be dealt with - add a temporary password (randomly generated) to the account with an expiry date (normally 24 hours) and email that to the user, together with instruction on how to reach the "change password" part of your app. The user logs in with the temporary password you emailed to him, and changes it to one he can remember. This does require you to get a validated email address as part of your "sign up" procedure!
If the temporary password isn't used or changed before the expiry period runs out, it becomes invalid and is removed.