From 77ab0e7c2ad0af22934d78d56d01347de11ade29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerardo=20Marx=20Ch=C3=A1vez-Campos?= Date: Sat, 24 Apr 2021 14:10:56 +0000 Subject: [PATCH] Adding C code and instructions on Redmen --- Readme.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 4ad9946..836bfa6 100644 --- a/Readme.md +++ b/Readme.md @@ -1,4 +1,24 @@ # Lecture 4: An overview of C and C++ A long this lecture let us test two basic Hello World scripts on C and C++, respectively. The idea is to remember the compilation chain process to obtain an executable application. -## C-code +## The Hello-Wolrd on C +The code used for this example is +```c +//Gerardo Marx 24/04/2021 + #include + int main(int argc, char *argv[]){ + printf("Hello World from BeagleBoard!!\n"); + return 0; + } +``` + +then to compile on an executable code use +```bash +$ gcc hello-world.c -o +``` +here the `` is the name that you want for your executable code. + +Now it is possible to execute your new code by using: +```bash +$ ./ +$ Hello World from BeagleBoard!! \ No newline at end of file