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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the importance of c in your views?

1157


I need previous papers of CSC.......plz help out by posting them.......

2278


How do I determine whether a character is numeric, alphabetic, and so on?

1117


What is c value paradox explain?

1075


Can a local variable be volatile in c?

980


Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.

1313


In a byte, what is the maximum decimal number that you can accommodate?

1123


where are auto variables stored? What are the characteristics of an auto variable?

1062


What is a char c?

1033


Write a program to print “hello world” without using semicolon?

1109


What is #ifdef ? What is its application?

1091


What is a constant and types of constants in c?

1106


What is a pointer and how it is initialized?

1140


What is uint8 in c?

1091


Which is better between malloc and calloc?

1190