C++ is a superset of C, so 90% of that code is already in C - the
cout
stuff needs to be replaced by
printf
statements is all.
But ... first you will have to find an SHA-256 C library that you can use, as it's not a part of standard C at all. Google is the place to start:
sha256 c library - Google Search[
^]