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 / vaishu

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

Is This Answer Correct ?    12 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is time null in c?

1111


Can a pointer be static?

1130


I have a varargs function which accepts a float parameter?

1097


Explain a pre-processor and its advantages.

1190


What are the 4 types of unions?

1089


How will you divide two numbers in a MACRO?

1186


What is pointer in c?

1249


What is data structure in c language?

1161


What are structure members?

1144


What is dangling pointer in c?

1330


Define the scope of static variables.

1197


What is difference between structure and union in c programming?

1174


What are the keywords in c?

1173


can we implement multi-threads in c.

1177


Is a pointer a kind of array?

1246