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

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.

3153


What are local static variables? How can you use them?

1153


What do you mean by scope of a variable in c?

1015


What does char * * argv mean in c?

1070


A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

1110


How can I implement a delay, or time a users response, with sub-second resolution?

1079


hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...

1919


Is there any demerits of using pointer?

1075


What is the purpose of type declarations?

1121


design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.

1980


What do you mean by c what are the main characteristics of c language?

1037


Is c# a good language?

1015


What's the best way of making my program efficient?

1110


Explain goto?

1163


Why is a semicolon (;) put at the end of every program statement?

1076