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

How to reverse a string using a recursive function, with swapping?

5 Answers  


read the folllowing code # define MAX 100 # define MIN 100 .... .... if(x>MAX) x=1; else if(x<MIN) x=-1; x=50; if the initial value of x=200,what is the vlaue after executing this code? a.200 b.1 c.-1 d.50

4 Answers   TCS,


What is a volatile keyword in c?

0 Answers  


EXPLAIN #INCLUDE<STDIO.H> EXPLAIN #INCLUDE<CONIO.H>

4 Answers  


What is wrong with this statement? Myname = 'robin';

0 Answers  






List out few of the applications that make use of Multilinked Structures?

1 Answers   Accenture,


simple program for virtual function?

1 Answers  


What is the purpose of main( ) in c language?

0 Answers  


How can type-insensitive macros be created?

0 Answers  


which one is not preprocessor directive a)#if b)#elif c)#undef d)#pragma

16 Answers   Accenture, Infosys, TCS, Wipro,


What is the concatenation operator?

0 Answers  


The code is::::: if(condition) Printf("Hello"); Else Printf("World"); What will be the condition in if in such a way that both Hello and world are printed in a single attempt?????? Single Attempt in the sense... It must first print "Hello" and it Must go to else part and print "World"..... No loops, Recursion are allowed........................

14 Answers   HOV Services, IBM, Potty,


Categories