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 / ruchi

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

}

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 a constant?

994


Explain how can I open a file so that other programs can update it at the same time?

1055


Explain the use of fflush() function?

1024


Define recursion in c.

1199


What is the difference between union and structure in c?

1083


what do u mean by Direct access files? then can u explain about Direct Access Files?

2030


How to compare array with pointer in c?

1049


What standard functions are available to manipulate strings?

1074


Are c and c++ the same?

1004


How reliable are floating-point comparisons?

1034


What is static identifier?

1165


Define macros.

1222


Explain what math functions are available for integers? For floating point?

1062


Explain what is the purpose of "extern" keyword in a function declaration?

1028


I have seen function declarations that look like this

993