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

main()
{
int n;
printf("enter the number\n");
scanf("%d",&n);
if(n%2==0){
printf("number is even");}
else{
printf("number is odd");
}
}
or
if(n&1==0)
printf("even number");
else
printf(odd number");

Is This Answer Correct ?    31 Yes 38 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of volatile?

1152


Is python a c language?

1055


What are control structures? What are the different types?

1146


What is a function simple definition?

1170


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

2153


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

4052


What is the difference between far and near in c?

1121


Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.

5404


How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?

1079


How can you pass an array to a function by value?

1179


Explain what happens if you free a pointer twice?

1138


What is the code in while loop that returns the output of given code?

2075


What is pre-emptive data structure and explain it with example?

3790


in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

1156


‎How to define structures? · ‎

1149