Sunday, 19 March 2017

Introduction To Arrays || Arrays Initialization,Declaration,Input,output Array Values,Sorting Searching And Other Operations

Introduction to 1D Arrays
Array initialization, declaration, input and output array values, sorting, searching and other operations
Q1. Write a program that inputs 5 integer values from user, stores them in an array and shows the inputted elements as an output.
Q2. Write a program that inputs 5 integer values from user, stores them in an array and display  
a)      Minimum value

b)      Maximum value
   
c)      Average of all the values

d)      Product of even values


Q3. Write a program that enters 10 numbers in an array and sorts the array in ascending order.

Q4. Write a program that initializes an array of size 10.The array should start from 10 and move up to 100 
       with an increment of 10 in each value. It inputs a value from the user and searches that number     
       location in an array. If number not found then it should display that result.


0 comments:

Post a Comment