Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What is the basic structure of C language source program?
What is the basic structure of C language source program?
The basic structure of C program = main function +m* custom function +n* file contains, (where m and n are both greater than or equal to 0).

As can be seen from the formula, a C program must have one and only one main function, because the main function is the entry point and end point of the C program. Custom features and file inclusions may not be included.

Structure can be regarded as a special array. The structure name is equivalent to the array name. Structure variables are equivalent to array names, which is easy to understand.

An array contains a set of numbers of the same type. An array of integers, all of which are integers. A floating-point number group whose elements are all floating-point types. A structure contains a set of numbers, which usually belong to different types. Its members are integer, floating point and character. Whether there is a structure variable is the same as whether there is an array variable.

Extended data

The source code of the loop 1 to 100 formed by goto statement and if statement is as follows.

Master ()

{

int i,sum = 0;

I = 1;

Loop: if (I <; = 100)

{

sum = sum+I;

i++;

Go to loop;

}

printf("%d\n ",sum);

}