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
What is the scope of an external variable in c?
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
What is the size of enum in c?
What is keyword in c?
Is c language still used?
What functions are used for dynamic memory allocation in c language?
What is difference between stdio h and conio h?
What is pointer and structure in c?
how many errors in c explain deply
What is the use of define in c?
What is the difference between single charater constant and string constant?
Is sizeof a keyword in c?
What language is windows 1.0 written?
Explain what is the advantage of a random access file?
What are called c variables?