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

Is a pointer a kind of array?

1115


Explain data types & how many data types supported by c?

1024


What is the stack in c?

1082


write a program fibonacci series and palindrome program in c

978


define string ?

1057


What is the use of the function in c?

971


What is getch () for?

1149


What are the parts of c program?

1041


What is the use of a conditional inclusion statement in C?

1009


Why c is called procedure oriented language?

999


Does * p ++ increment p or what it points to?

1054


Can we replace the struct function in tree syntax with a union?

1238


What is the use of header files?

1058


What are c preprocessors?

1124


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

2191