Did you know ... | Search Documentation: |
Where do I find examples mixing C and Prolog? |
The best source of examples are the sources of the packages. They vary from very simple to highly complicated. You can examine the packages at GitHub. Good examples packages are:
You may also want to look at the Prolog source itself. Many of the foreign predicates use the public interface. Some use more low-level primitives.