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
Why is main an int?
Define linked lists with the help of an example.
Can circle be called an ellipse?
Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h
Are there any special rules about inlining?
Are vectors faster than arrays?
an integer constant must have atleast one a) character b) digit c) decimal point
Which one is a preferred language C or C++? Why?
What is command line arguments in C++? What are its uses? Where we have to use this?
Is swift faster than go?
What is the difference between global int and static int declaration?
Difference between declaration and definition of a variable.
What relational operators if statements in c++?
What do the header files usually contains?
How can you create a virtual copy constructor?