0
660views
Why boundary value analysis is required? Give example.
1 Answer
0
2views

i) Boundary conditions are special because programming, by its nature, is susceptible to problems at its edges.

ii) The boundary conditions are defined as the initial and the final data ranges of the variables declared.

iii) If an operation is performed on a range of numbers, odds are the programmer got it right for the vast majority of the numbers in the middle, but maybe made a mistake at the edges.

iv) The edges are the minimum and the maximum values for that identifier.

  1. #include<stdio.h>
  2. void main()
  3. {
  4. int i , fact=1, n;
  5. printf(―enter the number ―);
  6. scanf(―%d‖,&n);
  7. for(i =1 ;i <=n;i++)
  8. fact = fact * i;
  9. printf (―the factorial of a number is ‖%d‖, fact);
  10. }

The boundary condition in the above example is for the integer variable.

Please log in to add an answer.