Home  >  Article  >  Backend Development  >  What are the basic units of C language?

What are the basic units of C language?

尚
Original
2020-03-02 14:45:5119531browse

What are the basic units of C language?

C language program is composed of functions. Functions are the basic unit of C program. There is only one main() function in a C language program, except the main function. There can be several other functions, each function implements a specific operation.

Recommended: "c Language Tutorial"

A function is a piece of code that can be reused to complete a function independently. It can receive users The transmitted data may not be received. Functions that receive user data must specify parameters when defining them. Functions that do not receive user data do not need to be specified. Based on this, functions can be divided into parameterized functions and parameterless functions.

The process of encapsulating a code segment into a function is called function definition.

A function consists of two parts: the description part of the function. Including function name, function type, function attributes, function parameter (formal parameter) name, formal parameter type.

For more programming related content, please pay attention to the Programming Introduction column on the php Chinese website!

The above is the detailed content of What are the basic units of C language?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn