how to find the largest of given numbers in an array
Answer Posted / 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 |
Post New Answer View All Answers
What is polymorphism programming?
Why is encapsulation used?
write knight tour problem which is present in datastructure
What is persistence in oop?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
What are constructors in oop?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What is oops and why we use oops?
What is object and class in oops?
What do you mean by abstraction?
What is the fundamental idea of oop?
• What are the desirable attributes for memory managment?
What is inheritance write a program to show use of inheritance?
what are the ways in which a constructors can be called?
What is abstraction oop?