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
Add Two Numbers Without Using the Addition Operator
How can I do serial ("comm") port I/O?
What is volatile variable in c with example?
What is the auto keyword good for?
What is a program flowchart and explain how does it help in writing a program?
ATM machine and railway reservation class/object diagram
Between macros and functions,which is better to use and why?
main() { printf("hello"); fork(); }
How many levels deep can include files be nested?
What is a structural principle?
What is meant by int main ()?
What is the use of header?
What is the benefit of using an enum rather than a #define constant?
Explain that why C is procedural?
What is 02d in c?