Difference between revisions of "Belajar C: Compile Hello World"

From OnnoWiki
Jump to navigation Jump to search
(Created page with "==Buat Source Code== vi helloworld.c #include <stdio.h> int main() { // printf() displays the string inside quotation printf("Hello, World!"); return 0; }...")
 
Line 30: Line 30:
  
 
* [[Belajar C]]
 
* [[Belajar C]]
 +
* [[Programming]]

Revision as of 09:01, 23 January 2021

Buat Source Code

vi helloworld.c
#include <stdio.h>
int main() {
   // printf() displays the string inside quotation
   printf("Hello, World!");
   return 0;
}


Compile

gcc helloworld.c -o a.out


Run

sudo chmod +x a.out
./a.out


Referensi


Pranala Menarik