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...

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

Answer Posted / mohd adnan

/* By Mohd Adnan MCA(2007-10) IMS Ghaziabad */
/* by using bit wise operator*/
#include<stdio.h>
#include<conio.h>
void main()
{
int num;
printf("Enter any number:");
scanf("%d",%num);
(num&1)&&printf("Odd Number");
((num&1)==0)&&printf("Even Number");
getch();
}

Is This Answer Correct ?    37 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain modulus operator.

1050


Can you subtract pointers from each other? Why would you?

961


What is huge pointer in c?

1082


What are the features of the c language?

1082


Explain what are the different file extensions involved when programming in c?

1107


How can I run c program?

1165


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

8040


What are pointers in C? Give an example where to illustrate their significance.

1225


The statement, int(*x[]) () what does in indicate?

1146


Which is more efficient, a switch statement or an if else chain?

1019


When do we get logical errors?

1123


Do you know pointer in c?

1045


Can we compile a program without main() function?

1120


What is #include conio h?

996


any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above

1112