find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / asad
int oddeven(int n)
{
if(n&1)
return 1; //odd
else
return 0; //even
}
| Is This Answer Correct ? | 2 Yes | 7 No |
Post New Answer View All Answers
What are the types of variables in c?
Write a code to generate divisors of an integer?
Is a house a mass structure?
What is console in c language?
How can I run c program?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
Why does the call char scanf work?
What does c mean in standard form?
When c language was developed?
What does it mean when a pointer is used in an if statement?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
What does 4d mean in c?
Which is the memory area not included in C program? give the reason
What are the types of pointers?
What standard functions are available to manipulate strings?