Given a simple program designed to take inputs of integers
from 1-1000 and to output the factorial value of that
number, how would you test this program? You do not have
access to the code. Please be as specific as possible.
Answer Posted / tudor
write some programs to take a string input assumed to be
1000! 999! 500! or 1!, test the asspumption. and ouput the
result "OK" or "NOT OK"
Pass the output of program to be tested to your programs
using some scripting
e.g:
echo "testig 1!"
echo `echo "1" > targetprogram | test1fact`
echo "testig 500!"
echo `echo "500" > targetprogram | test500fact`
...
Also should test the output for 1001, 0, xyz, -1
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do you clear a buffer in c++?
What is an undefined behavior and sequence points
State the difference between pre and post increment/decrement operations.
How delete [] is different from delete?
Evaulate: 22%5 a) 2 b) 4 c) 0
What are punctuators in c++?
What is the difference between set and map in c++?
What is type of 'this' pointer? Explain when it is get created?
Which ide is best for c++?
What is a pointer how and when is it used?
What is ctime c++?
What is math h in c++?
Explain about Virtual Function in C++?
What is abstraction with real time example?
Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);