write a program for even numbers?

Answer Posted / dwarika

#include<stdio.h>
#include<conio.h>
int main()
{
clrscr();
int a;
printf("enter the no");
scanf("%d",&a);
if(a%2==0)
{
printf("no is even");
}
else
{
printf("odd no");
}
getch();
return 0;
}

Is This Answer Correct ?    56 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how should functions be apportioned among source files?

627


What is the scope of static variables in c language?

626


What is new line escape sequence?

810


while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above

738


What is zero based addressing?

713






swap 2 numbers without using third variable?

658


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

651


p*=(++q)++*--p when p=q=1 while(q<=6)

1266


What are predefined functions in c?

566


How to write c functions that modify head pointer of a linked list?

545


How will you write a code for accessing the length of an array without assigning it to another variable?

613


Why do we use main function?

635


Define C in your own Language.

640


FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

621


Can the sizeof operator be used to tell the size of an array passed to a function?

620