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 / vinocit

#include<stdio.h>
int main()
{
int n=10000;
char *s[2]={"Even","Odd"};
printf("%s",s[n&1]);
return 0;
}

Is This Answer Correct ?    47 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the default value of local and global variables in c?

982


Here is a good puzzle: how do you write a program which produces its own source code as output?

1035


What is d'n in c?

1071


What are the different properties of variable number of arguments?

1102


Calculate 1*2*3*____*n using recursive function??

1981


Why isn't it being handled properly?

1001


How to delete a node from linked list w/o using collectons?

2721


What is c method?

940


When should volatile modifier be used?

953


What is the heap in c?

1030


When should you not use a type cast?

1069


What are near, far and huge pointers?

1012


Write a program to identify if a given binary tree is balanced or not.

1091


What is the equivalent code of the following statement in WHILE LOOP format?

1247


What is the use of clrscr?

1053