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

How do I get a null pointer in my programs?

1077


Write a program in c to replace any vowel in a string with z?

1091


What is anagram in c?

892


How do you do dynamic memory allocation in C applications?

1063


What is main () in c language?

1098


An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode

1047


What is a pointer variable in c language?

1054


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

1085


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1859


What the different types of arrays in c?

1033


i want to know the procedure of qualcomm for getting a job through offcampus

2425


Explain how do you generate random numbers in c?

1059


What do you mean by keywords in c?

1101


What are the types of type specifiers?

993


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3643