Question: It will be written in C code. 6) Write a function that takes an array and its size as parameters and reverses the contents of
6) Write a function that takes an array and its size as parameters and reverses the contents of the array. 7) Write a function called is_prime which takes an integer as parameter and checks whether the integer is prime or not. (a prime number is a number which is divisible by only 1 and itself. 2 is prime, 1 is not prime) If the integer is prime, your function will return 1, otherwise it will return 0 8) Write a function called is_germain_prime which takes an integer as parameter and checks whether the integer is a germain prime or not. (A germain prime is a number p such that p is prime and 2p + 1 is also prime) If the integer is a germain prime, your function will return 1, otherwise it will return 0. hint: use the is_prime function 9) Write a program which takes two integers x and y (you may assume that x and y are greater than 2) and prints the germain primes between (and including) x and y in ascending order hint: use the is germain_prime function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
