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 / d.c.sathishkumar

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

}

Is This Answer Correct ?    17 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by high-order and low-order bytes?

1001


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

1009


What is the meaning of && in c?

961


How can you allocate arrays or structures bigger than 64K?

1082


How can I use a preprocessorif expression to ?

993


Why c is called free form language?

967


Is c easy to learn?

932


The statement, int(*x[]) () what does in indicate?

1080


What is %d used for?

992


With the help of using classes, write a program to add two numbers.

981


c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above

1203


Is c is a high level language?

1123


What is the difference between far and near in c?

993


What is the use of extern in c?

1046


Explain how can I convert a string to a number?

1024