Steps involved in developing a c program
If the program compiles and links correctly, an executable image is produced. Phase 5 is called loading. Before a program can be executed, it must first be placed in memory. This is done by the loader, which takes the executable image from disk and transfers it to memory. Additional components from shared libraries that support the program are also loaded.
Finally, the computer, under the control of its CPU, executes the program one instruction at a time. Programs do not always work on the first try. Each of the preceding phases can fail because of various errors. If this occurs, you would have to return to phase-1 for editing, make the necessary corrections and proceed through the remaining phases again to determine that the corrections fix the problem s.
When we say that a program prints a result, we normally mean that the result is displayed on a screen. Data may be output to other devices, such as disks and hardcopy printers. There is also a standard error stream referred to as cerr. The cerr stream normally connected to the screen is used for displaying error messages. It is common for users to assign cout to a device other than the screen while keeping cerr assigned to the screen, so that normal outputs are separated from errors.
You are commenting using your WordPress. You are commenting using your Google account. You are commenting using your Twitter account. After running the program, the result is placed into User Screen. Just we need to open the User Screen to check the result of the program execution.
The file which contains c program instructions in a high-level language is said to be source code. Every c program source file is saved with. Compiler checks for the errors, if there are any errors, it returns a list of errors, otherwise generates object code in a file with name Sample.
The linker combines the code from specified header file into an object file and generates executable file as Sample. With this compilation process completes. Now, we need to run the executable file Sample. Then CPU performs the task according to the instructions written in that program and place the result into UserScreen. The perfect place for easy learning These things are very important for the programmer because it provides him the basis for planning about the programming and to control the potential difficulties that may arise.
In this stage all the instructions which are to be perform at different stages are listed. These are in simple English language. We may call it as a strategy.
All the steps which are written in the second stage are now presented in a diagrammatic manner so as to make it easily understandable. There is also a standard error stream referred to as stderr.
The stderr stream normally connected to the screen is used for displaying error messages. Share this: Twitter Facebook. Like this: Like Loading Leave a Reply Cancel reply Enter your comment here Fill in your details below or click an icon to log in:. Email required Address never made public.
Name required. Follow Following. Programming in C. Sign me up. Already have a WordPress.
0コメント