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...

find a number whether it is even or odd without using any
control structures and relational operators?

Answer Posted / vishal jain

#include<stdio.h>
#include<conio.h>
int main()
{
int num,i;
printf("Enter any Number : \n");
scanf("%d",&num);
i=num&1;
if(i==1)
{
printf("ODD");
}
else
{
printf("EVEN");
}
return 0;
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is %d used for?

999


Explain how can you restore a redirected standard stream?

1054


List out few of the applications that make use of Multilinked Structures?

2130


What are the advantages and disadvantages of pointers?

1031


Explain function?

1046


What is the use of sizeof?

984


What is return in c programming?

934


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

1046


How can I find the modification date and time of a file?

1050


show how link list can be used to repersent the following polynomial i) 5x+2

2215


Place the #include statement must be written in the program?

1003


What are the restrictions of a modulus operator?

1077


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

2055


Do you know null pointer?

984


Difference between linking and loading?

1072