write the program for maximum of the following numbers?
122,198,290,71,143,325,98
Answer Posted / mathew varghese
#include<stdio.h>
void main()
{
int a[10]={122,198,290,71,143,325,98};
int x,i;
x=a[0];
for(i=0;i<=6;i++)
{
if(a[i]>=x)
{
x=a[i];
}
}
printf("Maximum is %d \n",x);
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How can you call a function, given its name as a string?
Explain heap and queue.
What would be an example of a structure analogous to structure c?
Why do we use & in c?
What is logical error?
How can I find out if there are characters available for reading?
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
Explain what is wrong with this statement? Myname = ?robin?;
a c code by using memory allocation for add ,multiply of sprase matrixes
How can I make it pause before closing the program output window?
What is sizeof array?
can we change the default calling convention in c if yes than how.........?
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......
What is the explanation for prototype function in c?
Is there a way to jump out of a function or functions?