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
why return type of main is not necessary in linux
What is time complexity c?
What is the importance of c in your views?
What is typedef example?
Tell me what is the purpose of 'register' keyword in c language?
What is bubble sort in c?
What is a lookup table in c?
What are the parts of c program?
What are the preprocessor categories?
What is static and volatile in c?
Explain how can I open a file so that other programs can update it at the same time?
What is the difference between exit() and _exit() function?
What is the total generic pointer type?
What does #pragma once mean?
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.