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 / abhradeep chatterjee

ya. the first answer has impressed me.

#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 ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the best way of making my program efficient?

1040


Why we use conio h in c?

1242


Are the variables argc and argv are always local to main?

1025


will u please send me the placement papers to my mail???????????????????

1840


What is the difference between a function and a method in c?

1086


What are dangling pointers in c?

1236


Is javascript based on c?

1067


Explain union. What are its advantages?

1081


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

1061


Which is best linux os?

1028


the question is that what you have been doing all these periods (one year gap)

2090


What is the difference between local variable and global variable in c?

1237


What is time null in c?

1076


the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset

1109


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

1086