find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / rohit agarwal
#include<stdio.h>
#include<conio.h>
main()
{
int n;
char *p[]={"Even","odd"};
clrscr();
printf("Enter the number");
scanf("%d",&n);
n=n%2;
printf("The value is %s",p[n]);
getch();
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is an example of structure?
how to build a exercise findig min number of e heap with list imlemented?
What is logical error?
What does the error message "DGROUP exceeds 64K" mean?
What do you mean by invalid pointer arithmetic?
What are void pointers in c?
The __________ attribute is used to announce variables based on definitions of columns in a table?
Explain what’s a signal? Explain what do I use signals for?
What is the best way to store flag values in a program?
How do we declare variables in c?
Explain logical errors? Compare with syntax errors.
how to construct a simulator keeping the logical boolean gates in c
What is difference between far and near pointers?
What is structure in c language?
What is anagram in c?