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 mean of function?
What is the use of typedef in structure in c?
Explain what are bus errors, memory faults, and core dumps?
What is merge sort in c?
Can a local variable be volatile in c?
Explain what is the concatenation operator?
What is the difference between fread and fwrite function?
Why #include is used in c language?
What is a program?
Explain the use of #pragma exit?
To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9
Why isn't any of this standardized in c? Any real program has to do some of these things.
What are the 3 types of structures?
What are header files in c programming?
How can I find out how much free space is available on disk?