class: center, middle # Introduction to C #### Yueh-Hua Tu #### 2020.10.23 --- # C compilers ### GNU compiler collection [Wikipedia - GCC](https://en.wikipedia.org/wiki/GNU_Compiler_Collection) -- ### Clang, based on LLVM [Wikipedia - clang](https://en.wikipedia.org/wiki/Clang) -- ### MS Visual C++ [Wikipedia - Microsoft Visual C++](https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B) -- ### Intel C++ compiler [Wikipedia - Intel C++ Compiler](https://en.wikipedia.org/wiki/Intel_C%2B%2B_Compiler) --- # C 的標準 ### ANSI C / ISO C / Standard C | 標準 | GCC | Clang | Visual C++ | Intel C++ compiler | 備註 | | ---:| ------------:| -----------:| ---------------:| ------------------:| --------------------------------:| | C89 | all | all | all | all | 這個版本的語言經常被稱作"ANSI C",或有時稱為"C89"。 | | C90 | all | all | all | all | - | | C99 | GCC 4.6, 4.7 | mostly | Visual C++ 2015 | mostly | - | | C11 | GCC 4.6, 4.7 | Clang 3.1 | Visual C++ 2019 | - | - | | C18 | GCC 8.1.0 | Clang 7.0.0 | Visual C++ 2019 | - | - | --- # Materials ### Hands on * [Learn C Programming](https://www.programiz.com/c-programming) * [C Tutorial](https://www.tutorialspoint.com/cprogramming/index.htm) ### Wiki * [C Programming - wikibooks](https://en.wikibooks.org/wiki/C_Programming) ### In details * [C Programming Language Tutorial](https://www.javatpoint.com/c-programming-language-tutorial) ### Intermediate issues * [C Programming Language](https://www.geeksforgeeks.org/c-programming-language/) ### Books * C Programming: A Modern Approach by K. N. King --- # Homework ### BMI calculator in C #### Input ```c Please input your height (cm): 187 Please input your weight (kg): 87 ``` -- #### Output ```c Your BMI is 24.879. ```