{{#items}}

{{text}}

{{/items}} {{ctaText}}

{{#items}} {{/items}}

showing results for - "how to check if the number is even or odd using bitwise operator"

Veronica

13 Aug 2020

```
1#include<bits/stdc++.h>
2using namespace std;
3int main()
4{
5 int num;
6 cin>>num;
7 if(num & 1){
8 cout<<"odd";
9 }
10 else{
11 cout<<"even";
12 }
13 return 0;
14}
```

similar questions

c 2b 2b check if odd or evenc 2b 2b check if number is even or oddfinding even and odd number program in c 2b 2bc 2b 2b sum of even and odd numbersc 2b 2b print the amount of odd integer between n and meven and odd in c 2b 2bqueries leading to this page

how can you use the 25 operator to determine if an integer is even or odd 3fhow to check even or odd using bitwise operatorcheck if odd even using bitwise operatorusing bitwise to check even oddeven or odd using bitwise operatorcheck even or odd using bitwise operatorcheck if number is odd or even bit 3afind the no is odd or even by using only bitwise operatorodd even using bitwisehow to check if the number is even or odd using bitwise operatorhow to find even and odd number using bitwise operatorodd even using bitwise operatoreven odd using bitwiseto check if a number is odd or even using bitwisecheck odd or even using bitwise operatoruse of bitwise operator to find even number or notcheck even odd using bitwise operatornumber is odd or even usinf bituse of bitwise and operator in finding odd evenhow to check if the number is even or odd using bitwise operator your answer for

you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content

please ensure to add code which is syntactically corrent and executes properly

ask question on maxinterview

you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content

please be clear, to the point and respectful