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

C Array8

The document outlines programming tasks involving arrays, including: calculating sums, counts, and other statistics of array elements; manipulating array elements through operations like reversing values, calculating factorials, and digit sums; searching arrays; and menu-driven programs to perform array calculations. Many tasks involve integer or float arrays, processing elements, and storing results in a new array.

Uploaded by

vinitajenny
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
215 views

C Array8

The document outlines programming tasks involving arrays, including: calculating sums, counts, and other statistics of array elements; manipulating array elements through operations like reversing values, calculating factorials, and digit sums; searching arrays; and menu-driven programs to perform array calculations. Many tasks involve integer or float arrays, processing elements, and storing results in a new array.

Uploaded by

vinitajenny
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

• 1 Create an array to store five student’s ages; input the age values from user and

print array.
• 1 Calculate sum of all elements of a float array and print it.

• 1 Calculate sum of odd or even elements (depending on user’s choice) of an int


array.
• Calculate sum of even elements and product of odd elements of an int array.
• 5 Count odd or even elements (depending on user’s choice) in an int array.

• 6 Count negative elements in an int array.

• 7 Count negative, positive and zero elements in an int array.

• 8 Print only prime elements of an int array.

• 9 Count non-prime elements of an int array.

0 Print and count only absolute elements in an int array.


0 Menu-based program having following menu-items:
1. Scan int array from user
2. Print all numbers
3. Print even numbers
4. Print prime numbers
5. Print non-prime numbers
6. Print absolute numbers
7. Print odd numbers
8. Exit
These menu-items should work on an int array.
• 1 Find sum of digits of each element of an int array and store each sum in
respective element of another array. Give proper output.
• 1 Find reverse of each element of an int array and store each reverse in respective
element of another array. Give proper output.
• 1 Find factorial of each element of an int array and store each factorial in
respective element of another array. Give proper output.
• 1 Find maximum element from an int array.

• 1 Find minimum element from an int array.

• 1 Find maximum or minimum element (depending upon user’s choice) in an int


array.
• 1 Read an int variable (say search_int) from user. Now read an int array from user
and count number of occurance of the variable search_int in the int array. Print
the no. of occurance.
1) Write programs to --
• 1 Scan and add two int arrays and store answer in third int array.

• 2 Create menu-based array-caluculator to perform +,-,*,/ on two int arrays. Store


answer in third int array.

You might also like