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 / vishal jain

#include<stdio.h>
#include<conio.h>
int main()
{
int num,i;
printf("Enter any Number : \n");
scanf("%d",&num);
i=num&1;
if(i==1)
{
printf("ODD");
}
else
{
printf("EVEN");
}
return 0;
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is nested structure with example?

1135


What are header files? What are their uses?

1286


Explain about the functions strcat() and strcmp()?

1095


Do character constants represent numerical values?

1399


What is the use of typedef in c?

1083


How can I trap or ignore keyboard interrupts like control-c?

1117


Why we use stdio h in c?

1098


What is storage class?

1124


Explain data types & how many data types supported by c?

1134


How can a program be made to print the name of a source file where an error occurs?

1267


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

1074


What does 1f stand for?

1236


What is cohesion in c?

1027


Explain a file operation in C with an example.

1175


Why c is procedure oriented?

1123