Write a C program to check a number even or odd, without using
any relational, arithmetic operator and any loops.
Answer Posted / geniuineprogrammer
u can use bitwise operator
if (no & 1) {
its odd
}
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
Explain can static variables be declared in a header file?
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
What is the difference between printf and scanf in c?
Tell us the use of fflush() function in c language?
What is an array? What the different types of arrays in c?
How to define structures? ·
What is the Purpose of 'extern' keyword in a function declaration?
Is c a great language, or what?
What are the advantages of c preprocessor?
What is a union?
Is c easy to learn?
What is the benefit of using const for declaring constants?
Is c language still used?
Explain what is the benefit of using an enum rather than a #define constant?