Write a C function remove_blanks()that replaces two or more consecutive blanks in the input string by a single blank. For example, if the input is:
“Grim return to the planet of apes!!”
Then output should be:
“Grim return to the planet of apes!!”
The function should return the number of blank spaces removed. Remember that string is a null-terminated character array! The function prototype is given below:
int remove_blanks(char input_string[],char output_string[]);
Write a C function remove_blanks()that replaces two or more consecutive blanks in the input string by a single blank. For example, if the input is:
“Grim return to the planet of apes!!”
Then output should be:
“Grim return to the planet of apes!!”
The function should return the number of blank spaces removed. Remember that string is a null-terminated character array! The function prototype is given below:
int remove_blanks(char input_string[],char output_string[]);
Write a function power(a, b), to calculate the value of a raised to b, using: (a) non-recursive method (b) recursion
Write a program to take the values of two integers and use pointers to add 10 to the value of each integer.
Write a function countEven(int*, int) which receives an integer array and its size, and returns the number of even numbers in the array.
Write a C program to read two strings and explain string library function.
1)strlen()
2)strcyp()
3)strcat()
4) strcmp()
Your second task is to implement the Insertion Sort algorithm by making a function with the
following prototype;
void insertion_sort(int * ptr_array, int size, int order);
This function takes as input a pointer to the start of the array, and the array size and sorts it in-
place. The last input to the function is the sorting order (0 for ascending and 1 for descending).
Your task is to perform some functions on integer arrays. Specifically you will write a C program
that does the following:
1. Declare an array of size 20.
2. Initialize the array with random values (use loop, and rand() function).
3. Print all the elements in the array.
4. Print all the elements in the array in the reverse order.
5. Print the array such that every Nth element gets printed. N is user input.
Write a program that reads 7 scores as input and outputs the average. The program should use an array of
floats. Note that you need to determine the highest and the lowest score and exclude them in the computation.
Write a program to calculate the factorial of an integer entered by the user using:
a. For loop
b. While loop
c. Do while loop