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


Please Help Members By Posting Answers For Below Questions

what is the use of void main() in C++ language?

861


What data structure is fastest, on average, for retrieving data: a) Binary Tree b) Hash Table c) Stack

797


Describe the setting up of my member functions to avoid overriding by the derived class?

811


Can you declare an array without a size in c++?

761


Do you know the problem with overriding functions?

784






Is ca high or low level language?

790


What are the classes in c++?

816


How would you implement a substr() function that extracts a sub string from a given string?

754


What is the difference between object-oriented programming and procedural programming?

882


Why #include is used?

785


Explain about Garbage Collector?

852


What are the characteristics of friend functions?

744


Do inline functions improve performance?

809


what is upcasting in C++?

909


What are the advantages of c++ over c?

796