find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / sanju uthaiah
#include<stdio.h>
int main()
{
char result[2]={"Even","Odd"};
int n=40;
printf("%d is %s",n,result[n%2]);
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
explain what is a newline escape sequence?
Why calloc is better than malloc?
What is the difference between union and anonymous union?
What are the string functions? List some string functions available in c.
Explain how can I make sure that my program is the only one accessing a file?
how do you execute a c program in unix.
Why can't I perform arithmetic on a void* pointer?
What is the purpose of void pointer?
What does a function declared as pascal do differently?
what is event driven software and what is procedural driven software?
Tell me what are bitwise shift operators?
What does do in c?
Explain how are portions of a program disabled in demo versions?
What is the hardest programming language?
What is c value paradox explain?