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

writ a program to compare using strcmp VIVA and viva with its output.

1976


What are header files? What are their uses?

1123


In C programming, what command or code can be used to determine if a number of odd or even?

990


Are enumerations really portable?

978


Can a pointer be null?

975


Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?

2521


What does c value mean?

1115


What is #include cctype?

1076


What is the difference between scanf and fscanf?

1199


Explain the meaning of keyword 'extern' in a function declaration.

1114


What the advantages of using Unions?

1164


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1035


What is a char in c?

931


What is identifiers in c with examples?

1118


What are the different types of objects used in c?

972