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...

To find whether a number is even or odd without using any
conditional operator??

Answer Posted / rudrakshala leela phani kumar

int main()
{
int a[2][5]={"Even","Odd"};
int n;
printf("Enter Integet No:");
scanf("%d",&n);
printf("\nResult:%d",a[n%2]);
}

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1293


Explain Function Pointer?

1120


What are the restrictions of a modulus operator?

1084


what is the height of tree if leaf node is at level 3. please explain

2112


How can you return multiple values from a function?

1075


In a switch statement, what will happen if a break statement is omitted?

1034


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

1259


Explain what is the difference between null and nul?

1101


What are the types of data files?

1173


Why do we use main function?

1130


Is c procedural or object oriented?

974


What is a lvalue

1052


How can I read a binary data file properly?

1119


What are the types of unary operators?

1155


How many types of functions are there in c?

1097