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...

what is the other ways to find a logic to print whether a
number is an even or odd wit out using % symbol??????? i
know three different ways to print it. so i need any other
different logic>>>>>

Answer Posted / abdur rab

You can do it without using if even

#include <stdio.h>

int main ( int argc, char* argv[] )
{
int _number;
char _value[2][5]={"EVEN", "ODD"};
printf( "Enter an ineteger :" );
scanf( "%d", &_number );
printf( "\nThe given number is :%s", _value [ x &
0x1 ] );
return ( 0 );
}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to establish connection with oracle database software from c language?

2258


number of times a digit is present in a number

2080


Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

1992


Why header files are used?

1161


Is the exit() function same as the return statement? Explain.

1157


What does the error 'Null Pointer Assignment' mean and what causes this error?

1258


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

2246


How does struct work in c?

1137


What is array of pointers to string?

1157


how can use subset in c program and give more example

2047


What is hungarian notation? Is it worthwhile?

1272


What is scope of variable in c?

1088


What are c preprocessors?

1242


What is use of #include in c?

1220


What does c mean in standard form?

1245