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
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
Explain built-in function?
Is null valid for pointers to functions?
What is the difference between c and python?
When is a “switch” statement preferable over an “if” statement?
Write a code of a general series where the next element is the sum of last k terms.
Disadvantages of C language.
What does int main () mean?
Write a program to check whether a number is prime or not using c?
How can I change their mode to binary?
Write a program in c to replace any vowel in a string with z?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
Is it better to use a macro or a function?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
I need previous papers of CSC.......plz help out by posting them.......