Write program to get largest element in array using function, C/C++ Programming

Assignment Help:

Write a program to get the largest element in an array using Function?

# include
int largest(int b[],int);
main()
{
int lar,a[5]={12,2,36,40,5};
lar=largest(a,n);
printf("%d",lar);
}

int largest(int b[],int num)
{
int i,max;
max=b[0];
for(i=1;i {
if(b[i]>max)
{
max=b[i];
}
}
return max;
}


Related Discussions:- Write program to get largest element in array using function

#decode the code, #Smugglers are becoming very smart day by day. Now they h...

#Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new techn

C++ multiplayer game programming project, C++ Multiplayer Game Programming ...

C++ Multiplayer Game Programming Project Project Description: We are seeking an experienced C++ Game Programmer to enhance clientside related aspects of MCS: Mars City Securi

Define functions with arguments and return values, Define Functions with ar...

Define Functions with arguments and return values? The earlier category functions receive values from the calling function through arguments but do not send back any value rath

Addition of array elements, Addition of array elements: #define rows 3 ...

Addition of array elements: #define rows 3 #define cols 3 void main() {                 int i=0,j=0,sum=0;                 int arr[rows][cols];

Decode the given code, write c++ program to decode the given code. in mobil...

write c++ program to decode the given code. in mobile keypad the integers from 1 to 9 will display the characters from a to z and 0 will assign a space

B tree, real time application of b tree

real time application of b tree

Stack, write a program in c language to implement stacks in a single array

write a program in c language to implement stacks in a single array

Program to define an array in c, Program to define an array in c: Writ...

Program to define an array in c: Write a program to define an array and print the value of array. void main() { int a[10]={0,11,21,34,44,75,46,57,88,89},i,j,k; clr

Program, program to check whether a given point lies inside a rectangle or ...

program to check whether a given point lies inside a rectangle or not

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd