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

Which is better malloc or calloc?

1057


What is .obj file in c?

1020


What is pointer and structure in c?

1068


What is return in c programming?

916


what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555

3003


Explain the difference between the local variable and global variable in c?

1024


What is "Duff's Device"?

1111


What are the c keywords?

1143


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

2228


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

1723


a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none

1088


Can we increase size of array in c?

918


how can f be used for both float and double arguments in printf? Are not they different types?

1013


How are Structure passing and returning implemented by the complier?

1103


Explain about block scope in c?

1030