find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / d.c.sathishkumar
#include<stdio.h>
main()
{
int n;
char *p[]={"Even","odd"};
Printf("Enter the number");
scanf("%d",&n);
n=n%2;
printf("The value is %s",a[n]);
}
| Is This Answer Correct ? | 17 Yes | 8 No |
Post New Answer View All Answers
What is meant by high-order and low-order bytes?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
What is the meaning of && in c?
How can you allocate arrays or structures bigger than 64K?
How can I use a preprocessorif expression to ?
Why c is called free form language?
Is c easy to learn?
The statement, int(*x[]) () what does in indicate?
What is %d used for?
With the help of using classes, write a program to add two numbers.
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
Is c is a high level language?
What is the difference between far and near in c?
What is the use of extern in c?
Explain how can I convert a string to a number?