find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / vishal jain
#include<stdio.h>
#include<conio.h>
int main()
{
int num;
printf("Enter any Number : \n");
scanf("%d",&num);
char *s[2]={"Even","Odd"};
printf("%s",s[num&1]);
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is a pointer a kind of array?
Explain data types & how many data types supported by c?
What is the stack in c?
write a program fibonacci series and palindrome program in c
define string ?
What is the use of the function in c?
What is getch () for?
What are the parts of c program?
What is the use of a conditional inclusion statement in C?
Why c is called procedure oriented language?
Does * p ++ increment p or what it points to?
Can we replace the struct function in tree syntax with a union?
What is the use of header files?
What are c preprocessors?
show how link list can be used to repersent the following polynomial i) 5x+2