Why you should learn C?  
You should learn C because:
1. C is simple. 
2. There are only 32 keywords so C is very easy to master. Keywords are words that have special meaning in C language. 
3. C programs run faster than programs written in most other languages. 
4. C enables easy communication with computer hardware making it easy to write system programs such as compilers and interpreters. 



Why we need Data and a Program: 
Any computer program has two entities to consider, the data, and the program. They are highly dependent on one another and careful planning of both will lead to a well planned and well-written program. Unfortunately, it is not possible to study either completely without a good working knowledge of the other. For that reason, this tutorial will jump back and forth between teaching methods of program writing and methods of data definition. Simply follow along and you will have a good understanding of both. Keep in mind that, even though it seems expedient to sometimes jump right into coding the program, time spent planning the data structures will be well spent and the quality of the final program will reflect the original planning.

Detection and Correction of Errors in a Program:
Syntactic errors and execution errors usually result in the generation of error messages when compiling or executing a program. The error of this type is usually quite easy to find and correct. There are some logical errors that can be very difficult to detect. Since the output resulting from a logically incorrect program may appear to be error free. Logical errors are often hard to find, so in order to find and correct errors of this type is known as logical debugging. To detect errors test a new program with data that will give a known answer. If the correct results are not obtained when the program obviously contains errors even if the correct results are obtained.
Computer Applications: However you cannot be sure that the program is error free since some errors cause incorrect result only under certain circumstances. Therefore a new program should receive thorough testing before it is considered to be debugged. Once it has been established that a program contains a logical error, some ingenuity may be required to find the error. Error detection should always begin with a thorough review of each logical group of statements within the program. If the error cannot be found, it sometimes helps to set the program aside for a while. If an error cannot be located simply by inspection, the program should be modified to print out certain intermediate results and then be rerun. This technique is referred to as tracing. The source of error will often become evident once these intermediate calculations have been carefully examined. The greater the amount of intermediate output, the more likely the chances of pointing the source of errors. Sometimes an error simply cannot be located. Some C compilers include a debugger, which is a special program that facilitates the detection of errors in C programs. In particular, a debugger allows the execution of a source program to be suspended at designated places, called breakpoints, revealing the values assigned to the program variables and array elements at the time execution stops. Some debuggers also allow a program to execute continuously until some specified error condition has occurred. By examining the values assigned to the variables at the breakpoints, it is easier to determine when and where an error originates.

Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

0 comments: