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 / sahithya

void main()
{
int n;
printf("enter n:");
scanf("%d",&n);
if(n%2==0)
printf( "even");
else
printf("odd");
}

Is This Answer Correct ?    15 Yes 34 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why isn't it being handled properly?

998


When should we use pointers in a c program?

1078


State two uses of pointers in C?

1006


What are header files? What are their uses?

1120


Write a program to print ASCII code for a given digit.

1034


Write a program to know whether the input number is an armstrong number.

1071


What is c language and why we use it?

999


What are the main characteristics of c language describe the structure of ac program?

1144


What is pass by reference in functions?

769


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

1032


Explain indirection?

1057


How can I manipulate strings of multibyte characters?

1071


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

1070


What are high level languages like C and FORTRAN also known as?

1105


Why #include is used in c language?

992