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 / d.c.sathishkumar

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

}

Is This Answer Correct ?    17 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1017


Explain built-in function?

1122


Is null valid for pointers to functions?

1155


What is the difference between c and python?

1155


When is a “switch” statement preferable over an “if” statement?

1131


Write a code of a general series where the next element is the sum of last k terms.

1020


Disadvantages of C language.

1086


What does int main () mean?

1003


Write a program to check whether a number is prime or not using c?

1039


How can I change their mode to binary?

1096


Write a program in c to replace any vowel in a string with z?

1098


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

2007


Is it better to use a macro or a function?

1146


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

1080


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

2278