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
Why is extern used in c?
What is selection sort in c?
What are the features of the c language?
What are the usage of pointer in c?
Define Spanning-Tree Protocol (STP)
How do you sort filenames in a directory?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
What is struct node in c?
Why c is a procedural language?
How can I swap two values without using a temporary?
What is structure padding in c?
can anyone suggest some site name..where i can get some good data structure puzzles???
using only #include
What are the different types of control structures in programming?
Explain what is the general form of a c program?