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

void odd_even_check(int z)
{
(z&1)?printf("\nodd\n"):printf("\neven\n");
}

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I direct output to the printer?

1324


Process by which one bit pattern in to another by bit wise operation is?

1173


What is wrong with this initialization?

1013


What is the correct code to have following output in c using nested for loop?

1091


What is function definition in c?

1084


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

1078


What is the difference between printf and scanf in c?

1362


What is a scope resolution operator in c?

1282


What's the right way to use errno?

1149


Explain how can a program be made to print the line number where an error occurs?

1224


Why doesnt long int work?

1052


Explain the properties of union.

1087


Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

3250


When should you use a type cast?

1130


Is main is a keyword in c?

1129