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

Is c programming hard?

1078


Write a C program to count the number of email on text

1965


Can an array be an Ivalue?

1137


p*=(++q)++*--p when p=q=1 while(q<=6)

1813


Is fortran still used today?

1147


Is it better to use a macro or a function?

1203


Explain is it better to bitshift a value than to multiply by 2?

1246


Which is better between malloc and calloc?

1249


How can I make it pause before closing the program output window?

1079


Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.

3211


Can you explain the four storage classes in C?

1165


why do some people write if(0 == x) instead of if(x == 0)?

1122


Explain how do you override a defined macro?

1129


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

1264


Why cant I open a file by its explicit path?

1081