Information Technology Assignment Answers Help

Information Technology Assignment Task Solutions

Get Assignment help Now

Do you need Information Technology Assignment Help? We have experienced assignment help experts who assist you with quality assignment writing services. Assignmenttask.com delivers Assignment Answers to students at an affordable price. You can clear any assignment related query with our 24/7 live chat support team.

1. Consider the following function written in C:

int check_prime (int n)

{

int is_prime = 1;

// 0 and 1 are not prime numbers if (n == 0 || n == 1) {

is_prime = 0;

}

for (int i = 2; i <= n / 2; ++i)

{

if (n % i == 0) { is_prime = 0; break;

}

}

return is_prime;

}

  • The above function takes an integer as an input (assume input range is -100 to +100) and returns 1 if it is a prime, otherwise it returns 0. Write a driver module (function) that will call the function check_prime and will display all prime numbers between -100 to +100. [4]

  • Draw a flowchart for the above function check_prime. How many decisions and how many conditions are there in the function and what are they? [4+3]

  • Write test cases (white-box) for the function check_prime so that it satisfies multiple- condition coverage criteria. [6]

  • Write back-box test cases using boundary value analysis method for the function check_prime. Exclude the test cases that have been already covered in question (b). [10+2]

  • Write test cases (if any) using experience based testing techniques. [1]