find largest element in array w/o using sorting techniques.
Answer Posted / manjunath
#include<stdio.h>
void main()
{
int a,b[4]={3,2,7,4,9};
a[0]=b[0];
for(i=1;i<5;i++)
{
if(a<b[i])
{
a=b[i];
}
}
printf("the largest num is %d",a);
}
| Is This Answer Correct ? | 3 Yes | 7 No |
Post New Answer View All Answers
Explain what is a static function?
Why & is used in c?
What is derived datatype in c?
Explain how do you determine the length of a string value that was stored in a variable?
Difference between goto, long jmp() and setjmp()?
Which type of language is c?
What is the use of static variable in c?
Explain about C function prototype?
Explain the term printf() and scanf() used in c language?
What is a ternary operator in c?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
What is ambagious result in C? explain with an example.
What is c language used for?
What is the size of structure pointer in c?
What is a pointer in c plus plus?