[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: off topic/learning C

Here's a practical example of writing, compiling and executing a piece
of C code on a Debian system:


#include <stdio.h>
int main()
  printf("Hello world!\n");
  return 0;

Comiling and running

/tmp$ gcc -o myhello myhello.c
/tmp$ ./myhello
Hello world!

If that doesn't work, let me know.  The gcc program has many options,
which you can find out about using the info reader.



            Julian Gilbey             Email: J.D.Gilbey@qmw.ac.uk
       Dept of Mathematical Sciences, Queen Mary & Westfield College,
                  Mile End Road, London E1 4NS, ENGLAND
      -*- Finger jdg@goedel.maths.qmw.ac.uk for my PGP public key. -*-

Reply to: