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

How can I find out how much free space is available on disk?

1061


Explain how do you view the path?

1183


Are local variables initialized to zero by default in c?

1057


What are lookup tables in c?

1005


In which language linux is written?

1236


The statement, int(*x[]) () what does in indicate?

1158


How can I read a binary data file properly?

1184


Should I learn c before c++?

1242


which is conditional construct a) if statement b) switch statement c) while/for d) goto

1225


Why is c fast?

1074


What is mean by data types in c?

1037


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2753


How do you print only part of a string?

1023


please explain every phase in the "SDLC" in the dotnet.

2627


Explain what standard functions are available to manipulate strings?

1087