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
How can I direct output to the printer?
Process by which one bit pattern in to another by bit wise operation is?
What is wrong with this initialization?
What is the correct code to have following output in c using nested for loop?
What is function definition in c?
In a switch statement, explain what will happen if a break statement is omitted?
What is the difference between printf and scanf in c?
What is a scope resolution operator in c?
What's the right way to use errno?
Explain how can a program be made to print the line number where an error occurs?
Why doesnt long int work?
Explain the properties of union.
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
When should you use a type cast?
Is main is a keyword in c?