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

Why header file is used in c?

1095


The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none

1246


What is logical error?

1124


Explain what are the advantages and disadvantages of a heap?

1092


Why ca not I do something like this?

1013


What is the difference between null pointer and wild pointer?

1196


What is bash c?

1010


Explain Function Pointer?

1167


Do you know the difference between exit() and _exit() function in c?

1062


Explain about the functions strcat() and strcmp()?

1052


What are the 5 data types?

1131


What is character set?

1168


What are the application of void data type in c?

1191


Why is c called c?

1020


Give me the code of in-order recursive and non-recursive.

1376