Is there a sample app using gpio pin?

I used the sysfs command, but I don’t know what api can be used to produce the desired output on the digital pin through which function call can be used.