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 are the advantages of using linked list for tree construction?
What is array of structure in c?
What is indirection? How many levels of pointers can you have?
How can a process change an environment variable in its caller?
Is null a keyword in c?
Are the variables argc and argv are always local to main?
How to compare array with pointer in c?
How are 16- and 32-bit numbers stored?
Why is c still so popular?
What does != Mean in c?
How do you use a 'Local Block'?
What is the scope of static variable in c?
What are the advantages of using Unions?
What is f'n in math?
Do pointers need to be initialized?