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 a file descriptor in c?

1115


What is c value paradox explain?

1079


Write the Program to reverse a string using pointers.

1003


Which built-in library function can be used to match a patter from the string?

1291


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

2566


What is the difference between Printf(..) and sprint(...) ?

1512


When is a null pointer used?

1100


Explain how can I read and write comma-delimited text?

1154


how do you programme Carrier Sense Multiple Access

1958


What is define directive?

1129


What is the use of typedef in c?

1021


Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1086


int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer

1022


Where are local variables stored in c?

1024


Explain the ternary tree?

1010