Add debug nodes to all outputs of the exec node, set them to Output Complete Message and check all properties of the outputs. There will probably be a helpful error message there.
Have you specified the full path to the executable file?
You've not checked in the flow file so we have no idea how you've configured the exec node.
Also you probably want to swap the dashboard start button for a inject node to get started and set the debug node to whole message not just payload to see more.
You should also check the Node-RED logs for more error messages.
As it is there isn't really anything we can help with so far.
And I assume you have tested running the compiles c program from the command line first?
The code when complied and run with a full path works just fine on my Ubuntu box with NR 4.1.0
Please don't be offended by the question, but your exec node is trying to run the compiled executable, not the C source code? Edit: I think that would give rc -13
Does it make a difference if you specify the full pathname of the executable eg /home/pedro/.node-red/bin/gen_percent (or wherever the file is)?
One cause of rc -2 is that the OS cannot find the file to execute it.