find largest element in array w/o using sorting techniques.
Answer Posted / pramod
#include<stdio.h>
int main()
{
int a[10]={13,12,34,56,73,21,234,5,76,2};
int tmp,i;
tmp=a[0];
for(i=0;i<=9;i++)
{
if(a[i]>tmp)
{
tmp=a[i];
}
}
printf("\n largest number is %d\n",tmp);
return 0;
}
| Is This Answer Correct ? | 27 Yes | 2 No |
Post New Answer View All Answers
What is data types?
What is sizeof int?
How many types of sorting are there in c?
what are enumerations in C
Why is sprintf unsafe?
how to write optimum code to divide a 50 digit number with a 25 digit number??
How to establish connection with oracle database software from c language?
What do you mean by invalid pointer arithmetic?
Using which language Test cases are added in .ptu file of RTRT unit testing???
Wt are the Buses in C Language
What are identifiers in c?
What is the difference between āgā and āgā in C?
What is unary operator?
What is %d used for?
What are local static variables?