Hello world C CGI

Table of Contents

1. C code

Demarcate a source block like C-c C-v d C <ret>

1.1. for hello world

Also tangle with C-c C-v t

#include <stdio.h>

int
main(void)
{
  printf("Status: 200 OK\r\n");
  printf("Content-Type: text/html\r\n");
  printf("\r\n");
  printf("<h1>hello, world</h1>\n");
  return 0;
}
Status: 200 OK
Content-Type: text/html

<h1>hello, world</h1>

1.2. After tangling, compile

cc -o hello-world.exe hello-world.c

Author: vfts

Created: 2022-11-14 Mon 03:49