write the program for maximum of the following numbers?
122,198,290,71,143,325,98
Answer Posted / akhilesh singh
main()
{
int i,j,temp,a[7]={122,198,290,71,143,325,98};
for(i=0;i<=5;i++)
{
for(j=0;j<=6;j++)
{
if(a[j]<a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
printf("%d",a[0]);
}
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
How do I read the arrow keys? What about function keys?
Why static variable is used in c?
If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above
What does int main () mean?
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Why c language?
What is use of #include in c?
What language is c written?
What is the difference between text files and binary files?
What is the difference between array and pointer in c?
Tell me the use of bit field in c language?
Is null always equal to 0(zero)?
Is anything faster than c?
Explain the use of function toupper() with and example code?