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

Which are low level languages?

629


What is the difference between struct and union in C?

568


What is the difference between int main and void main?

571


What is merge sort in c?

640


hi, which software companys will take,if d candidate's % is jst 55%?

1660






process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

1887


What is the scope of local variable in c?

574


What is the collection of communication lines and routers called?

608


What is meant by realloc()?

670


I need a sort of an approximate strcmp routine?

655


What is a buffer in c?

568


Where are c variables stored in memory?

592


Explain what are global variables and explain how do you declare them?

635


How many types of operators are there in c?

611


Explain about the constants which help in debugging?

843