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 difference between structure and union with example?

1039


Can the “if” function be used in comparing strings?

1033


What is the difference between array and pointer?

994


How can you return multiple values from a function?

1101


What is a newline escape sequence?

1090


What are the different types of endless loops?

1059


How do you construct an increment statement or decrement statement in C?

1213


Explain what are linked list?

1037


how do you programme Carrier Sense Multiple Access

1957


How can I find the modification date of a file?

1264


What is the meaning of && in c?

1003


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

3071


Explain how can you tell whether a program was compiled using c versus c++?

1087


Explain a pre-processor and its advantages.

1120


What does do in c?

1033