<u>C program for finding the largest Value in array of integers</u>
#include <stdio.h>
/*Function that returns the largest value stored in an array-of-int*/
int max(int array[], int m)
{
int i;
/* Initializing variable maximum with array[0]*/
int maximum = array[0];
/* Traversing array elements from 2 to last and comparing it with variable maximum*/
for (i = 1; i < m; i++)
if (array[i] > maximum)
maximum = array[i];
return maximum; //returning maximum element of array
}
//driver function
int main()
{
int array[] = {5, 78, 23, 65, 9}; //Input array
int m = sizeof(array)/sizeof(array[0]); //finding the length of array
printf("Largest in given array is %d", max(array, m));/*function calling and printing maximum element of array */
return 0;
}
<u>Output:
</u>
Largest in given array is 78
Local Are Network (LAN) is a network that connect computer (or other network devices) in a limited area (local area).
Wide Area Network (WAN) on the other hand is a network that connects computers on a a large geographical area. According these definitions, the following statement is true:
C) wide are network allow users to share files with a secure connection