void main (void){}", where main is the function name, which is the main function, void is the parameter type, and the function body is in the square brackets, which is the specific content of the function. ."/> void main (void){}", where main is the function name, which is the main function, void is the parameter type, and the function body is in the square brackets, which is the specific content of the function. .">

Home  >  Article  >  Backend Development  >  What is the basic structure of c language

What is the basic structure of c language

藏色散人
藏色散人Original
2020-02-11 09:10:2814041browse

What is the basic structure of c language

What is the basic structure of c language?

Basic structure of c language program:

#include<stdio.h>void main (void)
//这个就是主函数,第一个void 就是返回类型:有void,int ,float等可以选择,第二个是main就是函数名,这里是主函数,它名字固定的,其他的函数可以随意定义,第三个是void,是就是参数类型,一样可以由void,int,float等等选择。
{                              
//中括号内就是函数体了,是函数的具体内容了
int a,b;a=b=0;
}

C language is a general computer programming language and is widely used. The design goal of the C language is to provide a programming language that can be easily compiled, handle low-level memory, generate a small amount of machine code, and can run without any runtime environment support.

Although C language provides many low-level processing functions, it still maintains good cross-platform characteristics. C language programs written in a standard specification can be compiled on many computer platforms, and even include some embedded processors (single-chip microcomputer or MCU) and supercomputers and other operating platforms.

Recommended learning: c language video tutorial

Unique features

C language is a structured programming language with A procedural language with variable scope and recursive functionality.

C language passes parameters by value (pass by value), and a pointer (a pointer passed by value) can also be passed.

Different variable types can be combined using structures (struct).

There are only 32 reserved keywords, which makes naming variables and functions more flexible.

Some variable types can be converted, such as integer and character variables.

Through pointers, C language can easily perform low-level control of memory.

Preprocessor makes C language compilation more flexible.

The above is the detailed content of What is the basic structure 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