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;
printf("Enter any Number : \n");
scanf("%d",&num);
char *s[2]={"Even","Odd"};
printf("%s",s[num&1]);
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

Can variables be declared anywhere in c?

1095


what is ur strangth & weekness

2440


What is assert and when would I use it?

1015


Write a factorial program using C.

1087


What is meant by recursion?

1057


What are header files and what are its uses in C programming?

1248


What is a lookup table in c?

1124


What is variable initialization and why is it important?

1273


What is the condition that is applied with ?: Operator?

1134


Is null equal to 0 in sql?

1156


What is structure in c definition?

1059


What is the difference between if else and switchstatement

1940


Who invented bcpl language?

1201


What is the time and space complexities of merge sort and when is it preferred over quick sort?

1085


What is the symbol indicated the c-preprocessor?

1256