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...

How to find the given no is odd or even without checking of
any condition and loops. (Hint: Using array)

Answer Posted / anandi

void main()
{
int n;
char s[20][20]={"even","odd"};
printf("Enter the no.:");
scanf("%d",&n);
n=n%2;
printf("th no. is %s",s[n]);
getch();
}

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

1029


how is the examination pattern?

2029


Compare and contrast compilers from interpreters.

1124


What is realloc in c?

1125


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1351


write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list

2810


How do you list files in a directory?

1149


differentiate built-in functions and user – defined functions.

1098


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2871


What is 1d array in c?

1101


Explain the difference between exit() and _exit() function?

1175


using for loop sum 2 number of any 4 digit number in c language

2351


Explain main function in c?

1088


What is a constant and types of constants in c?

1140


how many errors in c explain deply

2096