How to find the given no is odd or even without checking of
any condition and loops. (Hint: Using array)
Answer Posted / vaishu
void main()
{
int n;
char s[]={"even","odd"};
printf("Enter the no.:");
scanf("%d",&n);
n=n%2;
printf("th no. is %s",s[n]);
getch();
}
| Is This Answer Correct ? | 12 Yes | 7 No |
Post New Answer View All Answers
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
develop algorithms to add polynomials (i) in one variable
What is the condition that is applied with ?: Operator?
Why can't I perform arithmetic on a void* pointer?
What is wrong with this declaration?
Differentiate between null and void pointers.
Can I initialize unions?
Explain what is wrong with this statement? Myname = ?robin?;
What is clrscr in c?
what is the difference between 123 and 0123 in c?
What does #pragma once mean?
What is clrscr ()?
I need a sort of an approximate strcmp routine?
Explain the meaning of keyword 'extern' in a function declaration.
What is a sequential access file?