c ----- second language learning

C language seven steps

1. Define the objectives of the program

2. Design Program

3. Write code

4. Compile

5. Run the program

6. Test and debug programs

7. maintain and modify the code


 

1. Define the objectives of the program

Should in general terms to describe the problem to be solved in the hands before writing program. What do you want the program must first clear their own want to do, think about what information your program needs, which calculate and control to be carried out, and what procedures should report information.

 

 


2. Design Program

Consider how to use the program to accomplish it. For example, the user interface should be what? How to organize the program? Who target users? Ready to spend more time to complete this program?

 

 

 


 

3. Write code

After designing a good program, you can write code to implement it. That is designed to translate the program into the C language.

 

 

 


 

4. Compile

Details compiled depending on the programming environment. Is to compile the source code is converted into executable code program. Executable code is a computer machine language code is represented. This instruction code is represented by a digital code composed. And different computers use different language machine

Introduction program. Like C compiler is responsible for translating C code into machine-specific language. In addition, also C compiler and C source code library (library contains a large number of standard functions for users, such as printf () and Scanf ()) to a final code combined procedures (more accurate

Indeed it says, should be referred to by a linker program to link library functions, but in most systems, the compiler runs linker ). Generate a user can run the executable file, wherein the code contains computer can understand.

The compiler also checks the C language program is valid. If the C compiler finds errors, it does not generate an executable file with an error. So understand the specific compiler reports errors or warnings are another programmer to master the skill.

 

 


 

5. Run the program

The default learning environment for Viusual Studio + win7, is generated by the compiler when success is win32 program that can be run directly in the operating system by double-clicking the file name or icon

 

 


 

6. Test and debug programs

Program run is a good sign, but sometimes run error will occur. Then you need to check whether the program is running along the lines of your design. You will find that your program has some errors, computer jargon is called bug. Find and fix errors in the process is called debugging.

 

 

 


 

7. maintain and modify the code

After creating the program, you find that the procedure is wrong, or you want to use the extension, this time you need to modify the program. If included in the program made clear the comments and adopt a rational design, to maintain and modify the code is very simple.

 

Guess you like

Origin www.cnblogs.com/xingrengao/p/11298460.html