RVS_SOLUTIONS
CSE Drain for all Engineering and MCA students
DS INTERVIEW SITE
RVS@CSE Solutions
Ravinuthalavs CSE Drain
DS INTERVIEW SITE
Monday, January 21, 2019
Find max of two integer arrays in C
int findMaxElement(int *arr1,int len1,int *arr2, int len2)
{
int m1=arr1[0];
for(int i = 1; i < len1; i++)
{
if(m1<arr1[i])
m1=arr1[i];
}
for(int i = 0; i < len2; i++)
{
if(m1<arr2[i])
m1=arr2[i];
}
return m1;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment