These C sample code are meant for GPGME beginners. GPGME is a great C library to let the C programmers use GNU PG programatically. However, it lacked easy-to-understand sample code when learning it. If you are a GPGME beginner and like me studying GPGME with the source code and tests, you might need these sample code. These tests are based on the tests under gpgme-1.6.0/tests/gpg and they are modified to make it more understandable.
Type on the terminal to compile
gcc -Wall t-encrypt.c
And run it
./a.out
Then check the sample source code to understand how GPGME is invoked.