To find whether a number is even or odd without using any
conditional operator??
Answer Posted / rudrakshala leela phani kumar
int main()
{
int a[2][5]={"Even","Odd"};
int n;
printf("Enter Integet No:");
scanf("%d",&n);
printf("\nResult:%d",a[n%2]);
}
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
Explain Function Pointer?
What are the restrictions of a modulus operator?
what is the height of tree if leaf node is at level 3. please explain
How can you return multiple values from a function?
In a switch statement, what will happen if a break statement is omitted?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
Explain what is the difference between null and nul?
What are the types of data files?
Why do we use main function?
Is c procedural or object oriented?
What is a lvalue
How can I read a binary data file properly?
What are the types of unary operators?
How many types of functions are there in c?