Write a C program to check a number even or odd, without using
any relational, arithmetic operator and any loops.



Write a C program to check a number even or odd, without using any relational, arithmetic operator..

Answer / geniuineprogrammer

u can use bitwise operator
if (no & 1) {
its odd
}

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More C Interview Questions

What is period operator in c?

3 Answers   Wipro,


write a program to display reverse of a number using for loop?

14 Answers  


A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above

2 Answers   Accenture,


What is the difference between exit() and _exit() function?

0 Answers  


Why do we use c for the speed of light?

0 Answers  






What is the general form of a C program?

0 Answers  


What is the method to save data in stack data structure type?

0 Answers  


write a function to find whether a string is palindrome or not and how many palindrome this string contain?

2 Answers   Aptech,


Write a pro-gramme to determine whether the number is even or odd?

1 Answers  


Write a program in c to replace any vowel in a string with z?

0 Answers   IBS,


Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers

0 Answers  


Can an array be an Ivalue?

0 Answers   EXL,


Categories