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 size of array float a(10)?
Why array is used in c?
What are volatile variables in c?
What is derived datatype in c?
What is function pointer c?
How many data structures are there in c?
Define and explain about ! Operator?
How can I handle floating-point exceptions gracefully?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
Tell me when is a void pointer used?
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
How are Structure passing and returning implemented by the complier?
What library is sizeof in c?
How do I get a null pointer in my programs?
what is the difference between class and unio?