C和Linux入门介绍
C : C is a general-purpose, imperative computer programming language, supporting structured programming, lexical variable scope and recursion, while a static type system prevents many unintended operations.
This is defined by wiki. What we should know is that C is a programming language, it is like English to us human as C programming language to the computer. The two thing in common with is both are language, and can be understand by different terminal(I mean human and computer) ?
Linux : Linux is a operating system, feels like Win10 and Android!
Tips: Linux is supposed to installed!
how to make dir and file
Make dir : mkdir <dirName>
- mkdir playground
Make empty file : > <fileName>
- > hello.c
how to open ASCII text
vim <fileName>
- vim hello.c
simple vim tips
i means insert mode, and press esc you could escape to ext mode. And you can use :wq command to save your work and exit.
#include<stdio.h>
#include<stdlib.h>
int main () {
printf("Hello World! \n");
exit(0);
}
how to compile the code
gcc -o <fileName (without extension name)> <fileName>
- gcc -o hello hello.c
./fileName(without extension name)
- ./hello
And then you should see the text in your ternimal:
Hello World!
开始写blog,github上发英文的,优快云上就发中文的,也算是一个锻炼吧。尽量写的简洁简单。编码关键在于动手实践,看着自己慢慢变强,成就感激励着我继续前行吧!供自己日后查阅以防忘记。
The key for coding is start typing something, and see the result. Rowing my own boat and make progress little by little.
MarkDown正文中使用<>尖括号消失怎么解决:
bug 原因:MarkDown中使用尖括号,会被默认为HTML语句,导致尖括号及括号里的内容均不显示。
解决方法:使用转义字符;<
对应 “<”, >
对应 “>”。