a. Find out the appropriate number of test cases for following code using Basis Path Testing...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
a. Find out the appropriate number of test cases for following code using Basis Path Testing int main() { int num1, num2, num3, max; for(int i=1,i<=10,i++) { printf("Enter three numbers: "); scanf("%d%d%d", &num 1, &num2, &num3); if(num1 > num2) { if(num1 > num3) { } else { } } else { max= numl; max = num3; if(num2 > num3) { max = num2; } } else { max = num3; printf("Maximum among all three numbers = %d", max); return 0; } a. Find out the appropriate number of test cases for following code using Basis Path Testing int main() { int num1, num2, num3, max; for(int i=1,i<=10,i++) { printf("Enter three numbers: "); scanf("%d%d%d", &num 1, &num2, &num3); if(num1 > num2) { if(num1 > num3) { } else { } } else { max= numl; max = num3; if(num2 > num3) { max = num2; } } else { max = num3; printf("Maximum among all three numbers = %d", max); return 0; }
Expert Answer:
Answer rating: 100% (QA)
Basis Path Testing is a whitebox testing method that invo... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
The curve C is given by the equations where t is a parameter. At A, t = 2. The line l is the normal to C at A. a. Find dy/dx in terms of t. b. Hence find an equation of l. 8 x = 4 3, 1 = 2 4t = t > 0
-
Find the values of z 1/3 , where z = cos 2 + j sin 2. Generalize this to an expression for 1 1 . Hence solve the equations (a) 2 2+2 Z = 1 (b) (z 3)6 - z = 0
-
At its current output level, a firms marginal revenue exceeds its marginal cost and its price is less than its average cost. Therefore, it should: A. Increase output until MR = 0 B. Increase its...
-
Assume that global lightning on the Earth constitutes a constant current of 1.00 kA between the ground and an atmospheric layer at potential 260 kV. (a) Find the power of terrestrial lightning. (b)...
-
At January 1, 2019, Cheng Ltd. reported retained earnings of 20,000,000. In 2019, Cheng discovered that 2018 depreciation expense was understated by 4,000,000. In 2019, net income was 9,000,000 and...
-
Discuss whether David has any alternatives other than implementing Stans orders.
-
What happens if you specify an invalid format string?
-
DeLong Corporation was organized on January 1, 2017. It is authorized to issue 10,000 shares of 8%, $100 par value preferred stock, and 500,000 shares of no-par common stock with a stated value of $2...
-
Gradient of the Rayleigh Quotient For a symmetric matrix A and a nonzero vector , the Rayleigh Quotient is defined by xT Ax xTx In the case where is an eigenvector, then the Rayleigh Quotient will...
-
1. Estimate the demand for soft drinks using a multiple regression program available on your computer. 2. Interpret the coefficients and calculate the price elasticity of soft drink demand. 3. Omit...
-
Consider the reaction: AgCl(s) > Ag + (aq) + Cl - (aq) (a) Calculate G at 25C. (b) What should the concentrations of Ag + and Cl - be so that G = -1.0 kJ (just spontaneous )? Take [Ag + ] = [Cl -...
-
How does having an open door policy within an organization relate to Kotter's change model?
-
3. (5 points) You write a call option with X-$40 and buy a call with X-$60. The options are on the same stock and have the same maturity date. One of the calls sells for $2 and the other for $9. a)...
-
Can you draw a use case digram about gym using these functions and develop them if possible?Functions: - Download Mobile pplication: The user can download the application for free through the phone...
-
1. Preparing a Top Ten List for Effective Business Presentations: Generate a list of the top ten mistakes speakers make based on your experience as a speaker and listener. Compile your ideas into a...
-
How does an exporter protect against foreign exchange fluctuation? What contract clauses can be included to limit such risk that could adversely affect?
-
Sarah has been retrenched recently due to bad economic condition. She was a sales clerk at Aliff Book Factory. With three mouths to feed, she has no option but to earn a living by herself. Her spouse...
-
Determine the values of the given trigonometric functions directly on a calculator. The angles are approximate. tan 0.8035
-
In this exercise, you will modify the program from Lab 7-2 in Chapter 7. If necessary, create a new project named Intermediate16 Project, and save it in the Cpp8\Chap08 folder. Copy the instructions...
-
In this exercise, you modify the program from ADVANCED Exercise 31. If necessary, create a new project named Advanced32 Project and save it in the Cpp8\Chap13 folder. Also create a new source file...
-
Create a program that displays the ending balance in a savings account, given the beginning balance, the deposit amounts, and the withdrawal amounts. Use two loops in the program: one to get the...
-
Calculate the principal direction corresponding to \(\sigma_{3}=-2\) in example 5.4. Data From Example 5.4: For the stress matrix given below, determine the principal stresses. 3 1 11 [0]=102 1 2 0
-
The state of stress at a point in the \(x y z\) coordinates is Determine the stress matrix relative to the \(x^{\prime} y^{\prime} z^{\prime}\) coordinates, which is obtained by rotating the \(x y...
-
If \(\sigma_{x x}=90 \mathrm{MPa}, \sigma_{y y}=-45 \mathrm{MPa}, \tau_{x y}=30 \mathrm{MPa}\), and \(\sigma_{z z}=\tau_{x z}=\tau_{y z}=0\), compute the surface traction...
Study smarter with the SolutionInn App