To find whether a number is even or odd without using any
conditional operator??

Answer Posted / naveen

main ()
{
int num;
if ( num & 1 )
printf ("num is odd number\n");
else
printf ("num is even number\n");
}

Is This Answer Correct ?    21 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

FILE PROGRAMMING

1773


Why calloc is better than malloc?

566


Hi can anyone tell what is a start up code?

1607


What are the advantages of c preprocessor?

706


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include...

4898






Why c is called a mid level programming language?

599


Is there a built-in function in C that can be used for sorting data?

742


How many levels of pointers can you have?

695


Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.

1718


What is structure of c program?

598


What are the string functions? List some string functions available in c.

596


write a program to display all prime numbers

1450


Are there constructors in c?

588


What is the advantage of a random access file?

637


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

1859