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

Write a program to find given number is even or odd without
using any control statement.

Answer Posted / rani

#include<stdio.h>
#include<conio.h>
void main()
{
char str[][10]={"even","odd"};
int no;
clrscr();
printf("\nEnter a number...");
scanf("%d",&no);
printf("\n%d is %s",no,str[no%2]);
getch();
}

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you determine the length of a string value that was stored in a variable?

1097


How can this be legal c?

1061


What are header files and what are its uses in C programming?

1162


What is a class c rental property?

1063


what are non standard function in c

1875


What are type modifiers in c?

1003


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

1483


what will be maximum number of comparisons when number of elements are given?

1867


Is register a keyword in c?

1003


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

1046


What is the difference between union and anonymous union?

1268


Explain what does the format %10.2 mean when included in a printf statement?

1313


What does volatile do?

951


#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

1105


What is the function of this pointer?

1253