Structure of C or C ++
Structure of C or C ++
The commands listed in the program listing (listing the same as the syntax) C or C ++ are written with blocks. Each block is working on tasks that match with the task. Make sure every function name in accordance with the commands that are in it. Don't make a reduction function but the name of the function of addition. In the C or C ++ program there should be at least one main function that is the main function. This play function is also called the parent function. Why parent? Because any program written in C or C ++ language should have this function.
What is a statement? So in the programming language, the commands that exist in the listing program is also called a statement. In the main function you can give empty statement but what do you expect for empty statement instead of empty program :). Yes, at least there is one statement lah. For the number of statements available, theoretically there is no explanation of how many limits can be written, so it can be concluded that there is no limitation in the statement in the program listing.
The above chart shows the structure of the procedure of writing the main function or other functions. So it is only the habits of the programmer that type of writing, depending on each individual.
Most programmers write the main function just to call another function to execute commands in the function. In addition to calling other functions, inside the main function also contains a basic statement.
If you want to add additional functionality other than the main function can be added to the top or bottom of the main function.
Comments
Post a Comment