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

find a number whether it is even or odd without using any
control structures and relational operators?

Answer Posted / vamsi

#include<stdio.h>
main()
{
int n;
string p[2]={"Even","odd"};
Printf("Enter the number");
scanf("%d",&n);
n=n%2;
printf("The value is %s",p[n]);

}

Is This Answer Correct ?    13 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain can you assign a different address to an array tag?

1124


Is sizeof a keyword in c?

1015


Why we use stdio h in c?

1098


Explain the difference between null pointer and void pointer.

1134


How can you increase the allowable number of simultaneously open files?

1211


What's the right way to use errno?

1201


What is the right type to use for boolean values in c?

1086


Define recursion in c.

1350


What are the properties of union in c?

1111


What is a good data structure to use for storing lines of text?

1139


Where does the name "C" come from, anyway?

1216


What is the difference between ++a and a++?

1274


hi send me sample aptitude papers of cts?

2221


shorting algorithmS

2313


What is the advantage of an array over individual variables?

1293