0% found this document useful (0 votes)
13 views

Arrays2

Arrays

Uploaded by

basimzahidc208
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)
13 views

Arrays2

Arrays

Uploaded by

basimzahidc208
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/ 1

Practice Programs

Arrays

1. Write a program that takes 7 values in arrays and display it on console.


2. Write a program that initialize 10 values in arrays and display sum of values at 5 th and 7th
index of array.
3. Write a program that declare array of size 10 with values {T*0, T*1, T*2, T*3, ………..}
where T is entered by the user, using loop..
4. Write a program that take 5 values in arrays, It also take a number n from user. Print all
values of array that are greater than n.
5. Write a program that initialize 10 values in arrays and print only even index values.
6. Write a program that initialize 10 values in arrays and print only even values(this is different
from above Question )
7. Write a program that initialize 10 values in arrays and count number of even and odd terms
in arrays
8. Write a program that initialize 10 values in arrays and sum all number of arrays. After taking
sum, print average as well.
9. Write a program that initialize 10 values in arrays and sum all even numbers of arrays.
10. Write a program that initialize 10 values in arrays and print all multiple of N. Where N is
entered by user.
11. Write a program that initialize 10 values in arrays. Your program asks a number N from user
and replaces it by another number T entered by user.
12. Write a program that initialize 10 values in arrays. Your program asks a number from user
and finds whether entered number is present in array or not?

You might also like