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

How to find the given no is odd or even without checking of
any condition and loops. (Hint: Using array)

Answer Posted / ligory antony

void main()
{
int n;
char *s[4]={"even","odd"};
printf("Enter the no.:");
scanf("%d",&n);
n=n%2;
printf("th no. is %s",s[n]);
getch();
}

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does main () mean in c?

1054


Write a program to identify if a given binary tree is balanced or not.

1089


what do u mean by Direct access files? then can u explain about Direct Access Files?

2025


How can I find out how much free space is available on disk?

1009


Why do we use static in c?

1063


What is a program flowchart and explain how does it help in writing a program?

1224


What is modifier & how many types of modifiers available in c?

982


What the different types of arrays in c?

1019


What is c variable?

991


please give me some tips for the placement in the TCS.

2050


How does #define work?

1006


What is meant by int main ()?

1154


What is size of union in c?

973


Explain what does the format %10.2 mean when included in a printf statement?

1289


What is signed and unsigned?

1012