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

Is c still relevant?

1093


What is volatile variable in c with example?

1050


what will be maximum number of comparisons when number of elements are given?

1911


Write a factorial program using C.

1087


What is difference between %d and %i in c?

1244


How can I pad a string to a known length?

1038


What are header files in c?

1085


What are called c variables?

1072


How many keywords (reserve words) are in c?

1146


What is difference between array and structure in c?

1199


Explain do array subscripts always start with zero?

1243


What is p in text message?

989


Can a void pointer point to a function?

1031


What is the difference between fread and fwrite function?

1092


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

5463