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 programme to find even numbers without using any
conditional statement?

Answer Posted / mathiyazhagan

#include<stdio.h>
main()
{
char res[2][5]={"Even","Odd"};
int n;
printf("Enter a number :");
scanf("%d",&n);
printf("the given no is = %s",res[n%2]);
}

Is This Answer Correct ?    51 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

1116


Explain how can you be sure that a program follows the ansi c standard?

1470


Explain two-dimensional array.

1056


What is the process of writing the null pointer?

1026


Explain what is the benefit of using an enum rather than a #define constant?

1216


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

1107


What is the use of header?

1084


Is there a way to compare two structure variables?

1106


What are terms in math?

1043


How many keywords (reserve words) are in c?

1134


What is the code for 3 questions and answer check in VisualBasic.Net?

2152


What is the purpose of the preprocessor directive error?

1262


Why enum is used in c?

946


how to write a c program to print list of fruits in alpabetical order?

2290


Write a program to reverse a given number in c?

1031