0% found this document useful (0 votes)
5 views1 page

Array Questions

The document outlines six array-related tasks including finding the maximum and minimum values, reversing an array, counting even and odd numbers, identifying the second largest element, checking if the array is sorted in ascending order, and finding the most frequent element. Each task includes specific instructions for accepting input and processing the array. The tasks are designed to enhance understanding of array manipulation and analysis.

Uploaded by

ralirendy89
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Array Questions

The document outlines six array-related tasks including finding the maximum and minimum values, reversing an array, counting even and odd numbers, identifying the second largest element, checking if the array is sorted in ascending order, and finding the most frequent element. Each task includes specific instructions for accepting input and processing the array. The tasks are designed to enhance understanding of array manipulation and analysis.

Uploaded by

ralirendy89
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Array questions

1.Find Maximum and Minimum

• Take an input (size of the array).


• Accept the input integers and store them in an array.
• Find and print the maximum and minimum values in the array.

2.Reverse an Array

• Accept an integer element into an array.


• Print the array in reverse order.

3.Count Even and Odd Numbers

• Accept numbers into an array.


• Count and print how many numbers are even and odd.

4.Find the Second Largest Element

• Accept numbers into an array.


• Find and print the second largest number.

5.Check if Array is Sorted (Ascending Order)

• Accept numbers into an array.


• Check if the array is sorted in ascending order and print "YES" or "NO".

6.Find the Most Frequent Element

• Accept numbers into an array.


• Find the most frequent element in the array.
• If multiple elements have the same highest frequency, print the smallest one.

You might also like