Course Solutions Uncategorized (Solved) : C Programming Write Program Following 1 Declare Integer Array B Ten Elements 21 5 10 3 12 Q38013176 . . . .

(Solved) : C Programming Write Program Following 1 Declare Integer Array B Ten Elements 21 5 10 3 12 Q38013176 . . . .

 

C programming:

Write a program that does the following

1- Declare the integer array b of ten elements {21, -5, 10, -3,12, 0, 1, -4, 4, 15} using array initializer.

2- Modify the value of array elements based on the following

    If the array element value is even, incrementits value by 1.

    If the array element value is odd, decrementits value by 1.

3- Write a method num_neg_elements that returns the number ofnegative elements in the array

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post