find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / vinocit
#include<stdio.h>
int main()
{
int n=10000;
char *s[2]={"Even","Odd"};
printf("%s",s[n&1]);
return 0;
}
| Is This Answer Correct ? | 47 Yes | 11 No |
Post New Answer View All Answers
What is the default value of local and global variables in c?
Here is a good puzzle: how do you write a program which produces its own source code as output?
What is d'n in c?
What are the different properties of variable number of arguments?
Calculate 1*2*3*____*n using recursive function??
Why isn't it being handled properly?
How to delete a node from linked list w/o using collectons?
What is c method?
When should volatile modifier be used?
What is the heap in c?
When should you not use a type cast?
What are near, far and huge pointers?
Write a program to identify if a given binary tree is balanced or not.
What is the equivalent code of the following statement in WHILE LOOP format?
What is the use of clrscr?