0% found this document useful (0 votes)
16 views2 pages

Cplab 5 Up

Uploaded by

Syed Iqbal Ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Cplab 5 Up

Uploaded by

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

Lab05: Arrays (One Dimension)

Objective(s):
1. To be able to apply Arrays in C++
2. To be able to use of One Dimension Array

Exercises

Exercise 1

Write a C++ program to convert an array into ascending order.


Sample Inputs:

Sample Outputs:

Exercise 2

Write a C++ program to search an element entered by user from array and display the searched
element and its location.
Sample Inputs:

Sample Output:

Sample Inputs:
Sample Output:

Exercise 3

Write a C++ program to find total number of elements in an array and print number of elements
repeated in an array also print all unique elements in an array.

Exercise 4

Write a program in C++ to identify array in which no zero present, and print those numbers. If
user input a value without zero program should terminate.

Exercise 5

Write a C++ program that asks user to enter 10 integer values. Store those values in one
dimensional array. Create another one dimensional array of same size, and store the values of
first array in reverse order. Print the result on Screen.
Output:

You might also like