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

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

}

Is This Answer Correct ?    13 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is omp_num_threads?

1038


How main function is called in c?

1072


What is calloc()?

1026


What are the types of data structures in c?

1082


What is the difference between near, far and huge pointers?

1033


What is the full form of getch?

1182


C language questions for civil engineering

1653


How is a null pointer different from a dangling pointer?

974


What is the method to save data in stack data structure type?

1035


how to capitalise first letter of each word in a given string?

1871


Write programs for String Reversal & Palindrome check

1009


Explain union.

1115


the question is that what you have been doing all these periods (one year gap)

2017


write a c program for swapping two strings using pointer

2567


Why c language?

1006