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 / dr:rahul

#include<stdio.h>
#include<conio.h>
void main()
{
int rahul;
printf("0 - odd number \t 1 - even number\n");
printf("enter the number :");
scanf("%d",&rahul);
printf(" %d ",rahul&1);
getch();
}

Is This Answer Correct ?    4 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is console in c language?

1066


What are volatile variables in c?

905


difference between object file and executable file

6663


Can we change the value of constant variable in c?

1023


What is %lu in c?

1199


Tell me what are bitwise shift operators?

1104


Is it better to bitshift a value than to multiply by 2?

1064


Write the syntax and purpose of a switch statement in C.

1065


What is variable declaration and definition in c?

872


write a proram to reverse the string using switch case?

2905


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

1016


What is extern c used for?

1018


Is main is user defined function?

1085


What is keyword with example?

1030


What is pre-emptive data structure and explain it with example?

3678