I have a compiled c binary (setch) which takes the parameters
404 Not Found
You want to pass a parameter to a CGI. The way to do that is not to separate them with a space, instead you want to put the parameter behind a "?" character. The HTTP server will then store everything that follows behind the question mark in the QUERY_STRING environment variable that your CGI can then read.
In your C program use
getenv("QUERY_STRING") to access the passed parameter.
Check https://en.wikipedia.org/wiki/Common_Gateway_Interface for a list of all environment variables that the HTTP server set for CGI programs. Be sure to treat the values as untrusted data.