answersLogoWhite

0


Best Answer

void f (int* a, int len) {

if (!a) return;for (int i=0; i<len; ++i) {

if (a[i]%2) {

printf ("%d is odd\n", a[i]);

} else {

printf ("%d is even\n", a[i]);

}

}

User Avatar

Wiki User

6y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you wwrite a Program that prints all odd and even numbers from an array?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a program which reads a list of ten numbers and print the list in reserve order in c program?

The simplest way is probably to read the numbers into an array and then prints each element of the array starting at the last one and moving backwards.


Program to count the number of numbers in an array using 8085 microprocessor?

A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.


Program to print all the even numbers of an array in visual basic?

find even number in array


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


What will be the program to arrange numbers stored in array in ascending order using pointers?

sorry


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


Could you Write a program for 8086 microprocessor that displays on the monitor the average of 2 numbers from an array?

How to write a program for mouse in microprocessor?


Write a c program to find the maximum of two numbers and print out with its position?

maxValue = function (array) {mxm = array[0];for (i=0; i&lt;array.length; i++) {if (array[i]&gt;mxm) {mxm = array[i];}}return mxm;}; i don't know


Accept 5 numbers in an array and display it?

Accept 5 numbers in an array and display it.


How do you write a program in java to read ten numbers and print sum of ten integers?

Add the numbers into one variable as you read them in. But if you prefer, you can read the numbers into an array and then use a loop to add the numbers together.


Write a java program to find sum of even and odd numbers in given array?

for(int i = 1; i &lt; 100; i+=2) { System.out.println(i); }


Make a C programming that displays the first four perfect numbers?

create a program that iterates until it finds a perfect number, then store that perfect number into an array. Continue iterating until you find three more. Then, you have an array of four perfect numbers.