Xah C Learning Notes

By Xah Lee. Date: . Last updated: .

This is my Clojure learning notes. When this tutorial is robust, i'll remove this paragraph. Meanwhile, you should read elsewhere.

first, install gcc

#include <stdio.h>

int main(void) {
  printf("hhh");
  return 0;
}

save this as xx.c

compile it by gcc xx.c

run it by ./xx.out

to specify a different output name, use gcc myfile.c -o newname.out

the stdio.h is at /usr/include/

variables

#include <stdio.h>

int main(int argc, char *argv[]) {
  int a, b;
  int c = 2, d = 4;
  int e = c + d;

  printf("%d\n", e);
  return 0;

}