Answer Posted / amrutha
int a[]=new int[10];
int max=a[0];
for(int i=0; i<10; i++)
{
if(a[i]>max)
{
max=a[i];
}
}
System.out.println("Maximum of 10 :" + max);
| Is This Answer Correct ? | 21 Yes | 8 No |
Post New Answer View All Answers
Explain class invariant.
Explain what you mean by a pointer.
Name the implicit member functions of a class.
What is the difference between a "copy constructor" and an "assignment operator" in C++?
Why cstdlib is used in c++?
What is the main purpose of overloading operators?
Can class objects be passed as function arguments?
What are separators in c++?
Explain the use of virtual destructor?
How would you use the functions sin(), pow(), sqrt()?
Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].
Explain the use of this pointer?
What do the header files usually contains?
Difference between pointer to constant and constant pointer to a constant. Give example.
What is the main purpose of c++?