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


Please Help Members By Posting Answers For Below Questions

How can I manipulate individual bits?

604


What is console in c language?

601


How would you obtain the current time and difference between two times?

722


What is static memory allocation?

600


i got 75% in all semester am i eligible for your company

1733






Is r written in c?

722


What do you mean by dynamic memory allocation in c?

644


Write a function that will take in a phone number and output all possible alphabetical combinations

594


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?

1909


What is a MAC Address?

624


what are bit fields in c?

599


What is default value of global variable in c?

560


What is string concatenation in c?

565


What is the explanation for modular programming?

681


How to declare a variable?

564