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

#include<stdio.h>
void main()
{
int p;
printf("number:");
scanf("%d",&p);
while(p%2)
{
printf("odd");
}
printf("even");
}

Is This Answer Correct ?    2 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the structure pointer?

2121


What is the difference between the = symbol and == symbol?

1111


What is bubble sort in c?

1049


which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

1717


What is build process in c?

1147


Explain how can I open a file so that other programs can update it at the same time?

1108


What is the difference between text files and binary files?

1347


Who is the main contributor in designing the c language after dennis ritchie?

998


Explain the difference between ++u and u++?

1131


Where register variables are stored in c?

960


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

1192


Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?

1119


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

2445


What are the c keywords?

1203


What are the types of macro formats?

1113