We explore here the simplest way for a web site to store a cookie on the computer where the browser runs. We augment the trivial C program to include a line in the http header to set a cookie with attribute-value pair “kind=wheat”. Compiling thus:
gcc -Wall pc.c -O3 -o ../../cgibin/pc.cgi
we install a new cgi program and now clicking this should set such a cookie on your machine.

To see if your cookie is set this program compiles to this which should report cookies for the web site.

RFC 2965