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

What is binary tree in c?

1035


All technical questions

1921


Explain how do you convert strings to numbers in c?

1019


What is structure data type in c?

967


What are different types of operators?

989


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 ].

1052


Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

2037


State the difference between realloc and free.

1030


What are the types of data files?

1144


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

2835


What is difference between stdio h and conio h?

1323


Why should I prototype a function?

1116


What are the different types of C instructions?

1244


Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

1185


Explain the difference between #include "..." And #include <...> In c?

980