Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Why is main an int?

988


Define linked lists with the help of an example.

1020


Can circle be called an ellipse?

1075


Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h

1129


Are there any special rules about inlining?

1078


Are vectors faster than arrays?

996


an integer constant must have atleast one a) character b) digit c) decimal point

1024


Which one is a preferred language C or C++? Why?

1087


What is command line arguments in C++? What are its uses? Where we have to use this?

1267


Is swift faster than go?

1094


What is the difference between global int and static int declaration?

1057


Difference between declaration and definition of a variable.

1135


What relational operators if statements in c++?

1172


What do the header files usually contains?

1053


How can you create a virtual copy constructor?

1084