How to reset nokia c7 security code

Welcome to Tom's Hardware Forums,
Here's what I would try... go to; Settings > Phone > Phone management and Security settings > Phone and SIM card. There you will find your security code options including the option to change the code (I believe - the manual does not say that specifically). At least, that is where I would look to change the code.
If you have forgotten the security code, you will have to contact Nokia for their assistance in resetting the code.
Hope it helps