Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program to find the number of even integers and odd
integers in a given array in c language

Answer Posted / rahul khare

#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],even=0,odd=0,i;
for(i=0;i<9;i++)
{
if(a[i]%2==0)
{
printf("%d\t",a[i]);
even++;
}
else
{
printf("%d\t",a[i]);
odd++;
}
}
printf("Total no of Even found is=%d",even);
printf("Total no of Odd found is=%d",odd);
getch();
}

Is This Answer Correct ?    134 Yes 75 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the advantage of an array over individual variables?

1241


How do you view the path?

1131


how many errors in c explain deply

2092


Where define directive used?

1097


Hi can anyone tell what is a start up code?

2085


Can you please explain the difference between strcpy() and memcpy() function?

1073


what do you mean by enumeration constant?

1015


List some basic data types in c?

1029


Explain what is the concatenation operator?

1174


What are the disadvantages of external storage class?

1062


What is getche() function?

1049


What is the main difference between calloc () and malloc ()?

1159


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

1061


What does *p++ do? What does it point to?

1065


What is a structural principle?

1170