J's Study log

[C] Functions 본문

Computer Language/C

[C] Functions

정우섭 2019. 12. 1. 16:09

The main frame of 'C' is just like this simple code.

 

1
2
3
4
5
6
7
#include <stdio.h>
 
int main() {
 ..
 ..
 return 0;
}
 

#  (Preprocessor)

- Preprocessor in 'C' is declared with '#'

- This process is done before a compiler works

- Starts from the first line of a code

 

So '#include' means to include something that is between '<>' bracket.

 

By this code we can contain other codes or header files.

 

 

 

int main()

- Most basic function in 'C'

- Codes in 'main()' are complied at first

- main() function is called by OS(Operating System) like Linux, Window10, etc.

- Every other functions are called by 'main()' directly or indirectly

 

 

 

return

- Keywords in 'C'

- Get out from the current function and return some value to where the function was called

- '0' means succeed, '1' means falied

- Never return 'local variable'

'Computer Language > C' 카테고리의 다른 글

[C] Integer  (0) 2019.12.01
[C] Data Type  (0) 2019.12.01
[C] Format specifier  (0) 2019.12.01
[C] Operator Priority  (0) 2019.12.01
[C] What is C  (0) 2019.12.01
Comments