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

provide an example of the Group by clause, when would you use this clause

2198


What is the process to generate random numbers in c programming language?

1177


What is the size of empty structure in c?

1085


Explain which function in c can be used to append a string to another string?

1090


Write a program on swapping (100, 50)

1126


What is a structure member in c?

1001


Explain what is the concatenation operator?

1169


What are the 4 types of functions?

1056


List the difference between a "copy constructor" and a "assignment operator"?

1017


How many types of arrays are there in c?

1047


Why static is used in c?

1096


Why void main is used in c?

1051


What is the purpose of 'register' keyword?

1098


What is strcpy() function?

1148


What is meant by type casting?

1053