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

write a c program to print a given number as odd or even
without using loop statements,(no if ,while etc)

Answer Posted / dheerendra

logic
main()
{
int a;
(a%2==0)?printf("even"):printf("odd")
}

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program to generate address labels using structures?

4568


what is reason of your company position's in india no. 1.

2323


Do you know what are the properties of union in c?

1077


What is the explanation for modular programming?

1205


What is the difference between local variable and global variable in c?

1227


How many main () function we can have in a project?

1105


Is c programming hard?

1015


Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

1146


What is a double c?

974


What is actual argument?

1058


What is the difference between arrays and pointers?

1121


What is use of pointer?

1079


If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above

1058


What is the difference between the local variable and global variable in c?

960


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

1075