- Back to Home »
- C »
- C - Program Structure
Thursday, April 16, 2015
C Program Structure:
- Preprocessor Commands (hiền xử lý: #include, #define, #if, #ifdef, ....)
- Functions (hàm, conn trỏ hàm, hàm inline, ...)
- Variables (scope: global, local; type: char, int, float, double, void; class: auto, register, static,extern)
- Statements (if, if ...else, elseif, switch, while, do, for loop)
- Expressions ( arithmetic, assignment, logical, bitwise, ...)
- Comments (/* block comment */, //line comment)
C Hello World (helloworld.c)
#include <stdio.h>
int main()
{
/* my first program in C */
printf("Hello, World! \n");
return 0;
}