To find whether a number is even or odd without using any
conditional operator??
Answer Posted / umair jatoi && zain ja
/* ZAIN JATOI AND UMAIR JATOI */
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int n;
printf("Enter any number:");
scanf("%d",&n);
if(n&1)
printf("%d is Odd number",n);
else
printf("%d is even number",n);
getch();
}
Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What is return type in c?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
Can we change the value of constant variable in c?
What is #include stdlib h?
What is the size of enum in c?
What is the sizeof () operator?
Explain what is a 'locale'?
Can we declare variables anywhere in c?
Why dont c comments nest?
Is there anything like an ifdef for typedefs?
Explain data types & how many data types supported by c?
What is the difference between printf and scanf )?
What is the use of define in c?
Is c still used?
Write a C program in Fibonacci series.