1, write code Considerations: (1) Do not forget to import the header file #include <stdio.h> (2) The main function has only one (3) After writing a line of code to have the English semicolon as the end "; " (4) denotes the English curly braces" { "and" &NBSP;} "of the block of code. Must appear in pairs (5) return 0 must be placed at the end of the program, after the code is not executed, you can omit (6) "/" is a translator, plus different letters to represent different functions, the most commonly used "/n" is the newline character 2, C language compilation process: (1) Create a C file Touch first.c (2) Input code #inlcude& lt;stdio.h> int main () { &N Bsp printf ("Hello world!\n"); & Nbsp;return 0; } (3) Compile C file cc first.c-c, generate target file " FIRST.O " (4) Link destination file with library function target file cc FIRST.O generate executable a.out (5) Execute this executable file./a.out on the screenOn output "Hello world!" NOTE: Regardless of the source file's file name, the resulting executable is a.out 3, data type shaping: int integer takes 4 bytes & nbsp long Long integer 8 bytes Short Integer 2 bytes Real (float type): Float single precision 2 bytes & nbsp Double double 4 bytes Char: char requires single quote "'" &nbs to describe a single letter p; Note: Commonly used for development is int and float 4, comments //: Single-line comments to explain a line of code /* */: Block comments, The ability to interpret a piece of code or to indicate the file at the beginning of a code file develop a habit of writing comments that will make your code more readable
C Language Foundation (i)