Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program (called assignment-1.cxx)-- (40 points) Write down the C++ program based on the following tasks. Creates an Array (1D array) and randomly
Write a program (called assignment-1.cxx)-- (40 points) Write down the C++ program based on the following tasks. Creates an Array (1D array) and randomly assign values. Show the array with assigned values. Finds the largest element along with the index from the Array. (Using function) Reverse the array elements (using a function by returning a pointer/array). Show the reverse array in the main function. 10 18 12 45 30 11 41 34 For example, if Array is like above then output will be Randomly assigned values in Array: 10 18 12 45 30 11 41 34 Largest element is 45 Index number is 3 Array in reverse order: 34 41 11 30 45 12 18 10
Step by Step Solution
There are 3 Steps involved in it
Step: 1
include iostream include cstdlib include ctime using namespace std Function to find the largest elem...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started