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
What is the ANSI C Standard?
What is the scope of local variable in c?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
What is uint8 in c?
Is it better to use a macro or a function?
What are the characteristics of arrays in c?
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
What is the difference between memcpy and memmove?
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25
How do I use strcmp?
main() { printf("hello"); fork(); }
What does do in c?
How do we declare variables in c?
Explain about the functions strcat() and strcmp()?
How do I get an accurate error status return from system on ms-dos?