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


Please Help Members By Posting Answers For Below Questions

Write a code to determine the total number of stops an elevator would take to serve N number of people.

970


What are the __date__ and __time__ preprocessor commands?

762


What is pointer to pointer in c language?

783


Write programs for String Reversal & Palindrome check

780


Can 'this' pointer by used in the constructor?

805


What are qualifiers in c?

763


What is the difference between a function and a method in c?

784


Why c is called procedure oriented language?

783


When is a void pointer used?

873


Why main is used in c?

812


Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?

2400


What is switch in c?

835


what do you mean by enumeration constant?

776


Explain what is a 'locale'?

778


Write a program to check whether a number is prime or not using c?

787