[C] C beginning in terminal

Make a text file that is named “hello.c “.

The contents is this.

#include 

main(){
  printf("Hello world !\n");
}

Then, launch terminal and type command

gcc hello.c -o hello

If you execute hello

./hello

Output is this.

Hello world !

If you do these process in terminal, it is simpler environment than XCode.

Tags:

Comments are closed.