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 / sanju uthaiah

#include<stdio.h>

int main()
{
char result[2]={"Even","Odd"};
int n=40;
printf("%d is %s",n,result[n%2]);
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

explain what is a newline escape sequence?

1143


Why calloc is better than malloc?

1093


What is the difference between union and anonymous union?

1375


What are the string functions? List some string functions available in c.

1043


Explain how can I make sure that my program is the only one accessing a file?

1277


how do you execute a c program in unix.

1158


Why can't I perform arithmetic on a void* pointer?

1159


What is the purpose of void pointer?

1102


What does a function declared as pascal do differently?

1224


what is event driven software and what is procedural driven software?

2621


Tell me what are bitwise shift operators?

1175


What does do in c?

1119


Explain how are portions of a program disabled in demo versions?

1173


What is the hardest programming language?

1214


What is c value paradox explain?

1164