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 the correct syntax for inheritance? 1) class aclass : public superclass 2) class aclass inherit superclass 3) class aclass <-superclass
What is abstraction?
What are the two different types of polymorphism?
why the argument is passed by reference to a copy constructor?example?
Why is polymorphism important in oop?
why reinterpret cast is considered dangerous?
Write an operator overloading program to write S3+=S2.
what about you? wahat is your object? introduce your self?
1 Answers Ajmal Perfumes, TCS,
What is virtual class and friend class?
What is static modifier?
Why is polymorphism used?
What is the difference between class and structure?