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
Does c have function or method?
What does sizeof return c?
How can I dynamically allocate arrays?
What is the use of f in c?
What is printf () in c?
What is the difference between char array and char pointer?
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include
Why is extern used in c?
Which is better pointer or array?
What is a file descriptor in c?
What is the method to save data in stack data structure type?
How can I read data from data files with particular formats?
What is string function in c?
Explain how do you list a file’s date and time?
How many keywords (reserve words) are in c?