Write a pro-gramme to determine whether the number is even or odd?



Write a pro-gramme to determine whether the number is even or odd?..

Answer / azad sable, chiplun

void main();
{
int n;
clrscr();
printf("enter any number");
scanf("%d",&n);
if(n%2==0)
printf("\nthe number is even");
else
printf("\nthe number is odd");
}
getch();
}

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More C Interview Questions

What is wild pointer in c?

0 Answers  


main() { int x=2, y=4 if ((x==2||y==4) x++ y++ if (y==4+1) { x=x+y; } y++; printf("The values of x and y are %d and %d."x,y); } What is the output?

5 Answers   TCS,


class foo { public: static int func(const char*& p) const; }; This is illegal, why?

8 Answers   Google,


process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

0 Answers   InterGraph,


Efficient data structure for store/search list of 1000 records a)array b)double linked list c)circular queue d)hash table

3 Answers   Value Labs,






can anyone please tell about the nested interrupts?

0 Answers  


Write a program to generate prime factors of a given integer?

9 Answers   Microsoft,


How can I discover how many arguments a function was actually called with?

0 Answers  


There is a number and when the last digit is moved to its first position the resultant number will be 50% higher than the original number.Find the number?

1 Answers  


What is the difference between typedef and #define?

0 Answers  


What does the && operator do in a program code?

0 Answers  


how to use showbits function?

2 Answers   Infosys, TATA,


Categories