find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / vamsi
#include<stdio.h>
main()
{
int n;
string p[2]={"Even","odd"};
Printf("Enter the number");
scanf("%d",&n);
n=n%2;
printf("The value is %s",p[n]);
}
| Is This Answer Correct ? | 13 Yes | 8 No |
Post New Answer View All Answers
Explain can you assign a different address to an array tag?
Is sizeof a keyword in c?
Why we use stdio h in c?
Explain the difference between null pointer and void pointer.
How can you increase the allowable number of simultaneously open files?
What's the right way to use errno?
What is the right type to use for boolean values in c?
Define recursion in c.
What are the properties of union in c?
What is a good data structure to use for storing lines of text?
Where does the name "C" come from, anyway?
What is the difference between ++a and a++?
hi send me sample aptitude papers of cts?
shorting algorithmS
What is the advantage of an array over individual variables?