Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Are bit fields portable?

1116


Under what circumstances does a name clash occur?

1170


explain how do you use macro?

1107


What is a double c?

944


Which type of language is c?

1034


What are control structures? What are the different types?

1049


What is modeling?

1007


What does void main () mean?

1193


Write a program to swap two numbers without using a temporary variable?

1091


What is merge sort in c?

1010


What is the collection of communication lines and routers called?

1079


What is uint8 in c?

1066


Explain what are the advantages and disadvantages of a heap?

1047


Why main is not a keyword in c?

1193


Explain what is a program flowchart and explain how does it help in writing a program?

1061