Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Max of arrays
//gcc 5.4.0 #include <stdio.h> #define n 5 int main(void) { int array1[n] = {-991,-2,-3,-4,-11111}; int array2[n] = {5,4,3,2,1}; int max=0; for(int i=0; i< n; i++){ if(array1[i] > max){ max = array1[i]; } } printf("Maximum is %d\n", max); return 0; }
run
|
edit
|
history
|
help
1
Nice1
Pointer arithmatic
CPTTRN_1
1.5 No. of Processors
Project 3 Part 1 v2
lab 12 v0.1
18BCE2182 ASSESS_1 Q1-7
Square pyramid
Maximum of Arrays
Lab 5 HW Spring 2017 v1