answersLogoWhite

0

A c program using bitwise or?

Updated: 8/17/2019
User Avatar

Wiki User

15y ago

Best Answer

... is possible to write, eg:

int main (void)

{

int a=0xE8, b=0xC4;

printf ("%x | %x = %x\n", a, b, a|b);

return 0;

}

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: A c program using bitwise or?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the use of bitwise operator in c plus plus?

They perform bitwise operations like AND (&), OR (|), XOR (^) and NOT (~).


Which is the code to multiply a number num1 by 2 using bitwise operator in c?

num1 <<= 1; /* shift left */


What is use of l in c language?

Bitwise OR.


How is a bitwise copy created in c plus plus?

You could just use memcpy(3), using sizeof() to get the object size.


How do you Swap two numbers using bitwise operator C?

//lets assume a = 10; b = 20; a = a^b; b = a^b; a = a^b;


C program for comparison of dates using structures?

C program for comparison of dates using structures


What are Bit Manipulations in C programming?

in C you can manipulate the individual bits of a data item. << leftwise shift >> rightwise shift & bitwise AND | bitwise OR ~ bitwise complement (flips all bits) I can't go intoa tutorial here in how to use these, but google it - i just did and there's tons of info out there.


How many bitwise operators are present in Java?

The bitwise & operator performs a bitwise AND operation. The bitwise ^ operator performs a bitwise exclusive OR operation. The bitwise | operator performs a bitwise inclusive OR operation.


How do you swap two variables using bitwise operators?

a := a XOR b b := a XOR b a := a XOR b it works, but never use it in real programs do you know why its not used in real program??


Write Client and server program in C language using UDP?

Write and run a client and a server program in C-language using UDP


How many types of logical operators in c only?

There are three logical operators in C; AND (&), OR (|), and NOT (^). These are the bitwise versions. The combinatorial versions are &&, , and !.


Write a c program Fibonacci series using for loop in java?

Exactly what do you mean by 'C program in Java'