written 5.8 years ago by | • modified 5.8 years ago |
The various terms related to software failure with respect to the area of application are listed as Defect, Variance, Fault, Failure, Problem, Inconsistency, Error, Feature, Incident, Bug, and Anomaly.
Fault: An incorrect step, process, or data definition in a computer program.
Error: A human action that produces an incorrect result.
An error can be a grammatical error in one or more of the code lines, or a logical error in carrying out one or more of the client‘s requirements.
Not all software errors become software faults. in some cases, the software error can cause improper functioning of the software. In many other cases, erroneous code lines will not affect the functionality of the software as a whole.
A failure is said to occur whenever the external behavior of a system does not conform to that prescribed in the system specification. A software fault becomes a software failure only when it is ―activated‖
The various terms related to software failure with respect to the area of application are listed as Defect, Variance, Fault, Failure, Problem, Inconsistency, Error, Feature, Incident, Bug, and Anomaly Problem, error, and bug are probably the most generic terms used.
Anomaly, incident, and variance don‘t sound quite so negative and infer more unintended operation than an all-out failure.
Fault, failure, and defect tend to imply a condition that‘s really severe, maybe even dangerous. It doesn‘t sound right to call an incorrectly colored icon a fault. These words also tend to imply blame: ―It‘s his fault that the software failed.
As all the words sound the same they are distinguished based on the severity and the area in which the software failure has occurred.
When we run a program the error that we get during execution is termed on the basis of runtime error, compile time error, computational error, and assignment error.
The error can be removed by debugging, if not resolved leads to a problem and if the problem becomes large leads to software failure.
A bug can be defined as the initiation of error or a problem due to which fault, failure, incident or an anomaly occurs.
The program to find the factorial of a number given below lists few errors problem and failure in a program.
For example
#include<stdio.h>
void main()
{
int i , fact, n;
printf(―enter the number ―);
scanf(―%d‖,&n);
for(i =1 ;i <=n;i++)
fact = fact * i;
printf (―the factorial of a number is ‖%d‖, fact);
}
As in line number 4 the fact is not initialized to 1, so it takes garbage value and gives a wrong output, this is an example of a bug. If fact is initialized to zero (fact = 0) than the output will be zero as anything multiplied by zero will give the output as zero.
This is a bug which can be removed by initializing fact = 1 during initializing. As the fact is declared as integer, for the number till 7! will work perfectly. When the number entered is 8, the output is garbage value as the integer limit is from – 32767 to +32768, so in declaration change the initialization to long int fact