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 the benefit of using #define to declare a constant?

1061


Explain the difference between malloc() and calloc() function?

998


What is the use of function in c?

1152


How can I find the modification date of a file?

1231


What is difference between %d and %i in c?

1188


Can a pointer be static?

1032


What is a memory leak? How to avoid it?

1273


What is the purpose of the preprocessor directive error?

1216


write a program for the normal snake games find in most of the mobiles.

2225


c language interview questions & answer

1915


I have seen function declarations that look like this

1001


What is the explanation for modular programming?

1160


Which is more efficient, a switch statement or an if else chain?

981


Tell me what is null pointer in c?

1032


Differentiate between static and dynamic modeling.

1063