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 c program to print a given number as odd or even
without using loop statements,(no if ,while etc)

Answer Posted / avinash kumar

#include<stdio.h>
main()
{
int a;
clrscr();
printf("enter a number:");
scanf("%d",&a);
if(a%2=0)
printf("even");
else
printf("odd")
getch();
}

Is This Answer Correct ?    25 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you increase the size of a dynamically allocated array?

1149


What should malloc() do?

1111


What is a rvalue?

1149


How many header files are in c?

1001


Write a code to determine the total number of stops an elevator would take to serve N number of people.

1212


Explain what is the difference between #include and #include 'file' ?

977


What is the use of define in c?

1017


What is function prototype in c with example?

1019


Which header file is essential for using strcmp function?

1435


Why is c called a structured programming language?

1230


What is cohesion in c?

931


What is unsigned int in c?

945


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

2309


Differentiate between Macro and ordinary definition.

1301


Explain about the functions strcat() and strcmp()?

1002