To find whether a number is even or odd without using any
conditional operator??
Answer Posted / naveen
main ()
{
int num;
if ( num & 1 )
printf ("num is odd number\n");
else
printf ("num is even number\n");
}
| Is This Answer Correct ? | 21 Yes | 13 No |
Post New Answer View All Answers
How many identifiers are there in c?
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
What are nested functions in c?
What are the different properties of variable number of arguments?
Is c weakly typed?
What will the preprocessor do for a program?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
Explain how can I avoid the abort, retry, fail messages?
How do I round numbers?
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
Write a program to find factorial of a number using recursive function.
Which type of language is c?
Where are local variables stored in c?
How do you construct an increment statement or decrement statement in C?
What is an lvalue?