how to find the largest of given numbers in an array
Answers were Sorted based on User's Feedback
Answer / jvhariharan
void main()
{
int a[10],i,max,m;
pf("enter the range of array");
sf("%d",&m);
pf("enter the values:");
for(i=0;i<m;i++)
{sf("%d",&a[i]);
}
max=a[0];
for(i=1;i<m;i++)
{if(a[i]>max)
{max=a[i];
}}
pf("the max no:%d",max);
}
| Is This Answer Correct ? | 12 Yes | 0 No |
Answer / anmol.s.fattepur
void ANMOL()
{
int a[10],i,max,m;
pf("enter the range of array");
sf("%d",&m);
pf("enter the values:");
for(i=0;i<m;i++)
{sf("%d",&a[i]);
}
max=a[0];
for(i=1;i<m;i++)
{if(a[i]>max)
{max=a[i];
}}
pf("the max no:%d",max);
}
| Is This Answer Correct ? | 1 Yes | 0 No |
What is polymorphism and types?
What is difference between function overloading and overriding?
what is the application of oops?
How to reverse a sentence in c program ex: ram is a good boy answer: boy good a is ram
diff between Virtual mathod and abstract method?
Name an advantage of array over linked list?
24 Answers GML, IBM, Software Solutions,
what is cast operator?
how can we design a magic square in c++?or suggest me the basic idea of it.
• What are the desirable attributes for memory managment?
Why is polymorphism used?
class type to basic type conversion
Difference between vector and array