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
Which built-in library function can be used to match a patter from the string?
How do you determine whether to use a stream function or a low-level function?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
Can math operations be performed on a void pointer?
c language interview questions & answer
Explain enumerated types in c language?
Can one function call another?
Explain what is page thrashing?
What is a structure in c language. how to initialise a structure in c?
Tell us bitwise shift operators?
Is the exit() function same as the return statement? Explain.
Is c easy to learn?
What is main function in c?
What are the features of c languages?
What are the 5 data types?