Problem 21:
The function findMaxElement(int *arr1,int len1,int *arr2,int len2) accepts twointeger arrays arr1,arr2 of length len1,len2 respectively.It is supposed to return the largest element in both the input arrays.
Another function sortArray(int *arr,int len) sorts the input array arr of length lenin ascending order and returns the sorted array.
Your task is to use sortArray(int *arr,int len) function and complete the codein findMaxElement(int *arr1,int len1,int *arr2,int len2) so that it passes all testcases”
int *sortArray(int len,int *arr)
{
int i=0,j=0,temp=0;
for(i=0;i<len;i++)
{
for(j=i+1;j<len;j++)
{
if(arr[i]>arr[j])
{
temp=arr[i];
arr[i]=arr[j];
arr[j]=temp;
}
}
}
return arr;
}
int findMaxElement(int len1,int *arr1,int len2,int *arr2)
{
//write code here
}

Problem 22:
The function allExponent(int base,int exponent)accepts two integers base and exponent as inputs.it is supposed to calculate and return of exponentation of base raised to power exponent for all input values.
The function positiveExponent(int base,int exponent) will return the exponentiation value if exponent value is positive. try to complete the code such that allExponent should return value if exponent value is negative
PROGRAM
float allExponent( int base,int exponent )
{
float res=1;
if(exponent >=0)
{
Res = (float)positiveExponent(base,exponent)
}
Else
{
//write ur code here
}
return res;
}

Problem 23:
You are given a predefined structure Point and related functions.
The function/method isTriangle which accepts three points P1,P2,P3 as inputs and checks whether the given three points form a triangle.
If they form a triangle the function return 1 else 0.
typedef struct point
{
int X; int Y;
}Point;
double Point_calculateDistance(Point *point1,Point *point2)
{
Point_calculateDistance(P1,P2);
}
isTriangle(Point *P1,Point *P2,Point *P3)
{
//write code
}

Problem 24:
Charlie has a magic mirror. The mirror shows right rotated versions of a given word.
To generate different right-rotations of a word, write the word in a circle in clockwise order,
then start reading from any given character in clockwise order till you have covered all the characters.