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 program for even numbers?

Answer Posted / joe

#include<stdio.h>
//#include<conio.h>

int main()
{
//clrscr();
int *a;
printf("\nenter the no\n");
scanf("%d",&a);
if(*a <0)
{
printf("\nEnter correct number :\n");
}
else if(*a%2==0)
{
printf("no is even");
}
else
{
printf("odd no");
}
getch();
main();
}

Is This Answer Correct ?    15 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between the expression “++a” and “a++”?

1211


What is a loop?

973


Explain built-in function?

1099


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

1140


How can I access an I o board directly?

1044


How a string is stored in c?

1030


What is the use of the function in c?

983


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

1064


What Is The Difference Between Null And Void Pointer?

1173


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

998


When should structures be passed by values or by references?

1006


Why doesnt that code work?

1091


What is memcpy() function?

1057


What is void pointers in c?

966


Can we use visual studio for c?

1019