To find whether a number is even or odd without using any
conditional operator??
Answer Posted / sahithya
void main()
{
int n;
printf("enter n:");
scanf("%d",&n);
if(n%2==0)
printf( "even");
else
printf("odd");
}
| Is This Answer Correct ? | 15 Yes | 34 No |
Post New Answer View All Answers
Why isn't it being handled properly?
When should we use pointers in a c program?
State two uses of pointers in C?
What are header files? What are their uses?
Write a program to print ASCII code for a given digit.
Write a program to know whether the input number is an armstrong number.
What is c language and why we use it?
What are the main characteristics of c language describe the structure of ac program?
What is pass by reference in functions?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
Explain indirection?
How can I manipulate strings of multibyte characters?
what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above
What are high level languages like C and FORTRAN also known as?
Why #include is used in c language?