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
What does the linker do?
What is a pdb file?
Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers
Explain what happens when a pointer is deleted twice?
How can we access protected and private members of a class?
What is the use of string in c++?
Is c++ a good first language to learn?
A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.
what is c++
Is c++ the best programming language?
What is long in c++?
What is the difference between global variables and local variable
Is c++ an integer?
Do inline functions improve performance?
Explain the pure virtual functions?