Normalize string in C

I'm doing a project in Language C for college where I need to receive a word with accents and normalize it.

For example: "olá" -> function returns -> "ola"

"moça" -> function returns -> "moca"

If someone could explain to me how accents work in C and how to do this kind of conversion I would be thankful.