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
How can I manipulate individual bits?
What is console in c language?
How would you obtain the current time and difference between two times?
What is static memory allocation?
i got 75% in all semester am i eligible for your company
Is r written in c?
What do you mean by dynamic memory allocation in c?
Write a function that will take in a phone number and output all possible alphabetical combinations
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
What is a MAC Address?
what are bit fields in c?
What is default value of global variable in c?
What is string concatenation in c?
What is the explanation for modular programming?
How to declare a variable?