Write a program using bitwise operators to invert even bits of
a given number.

Answer Posted / ayaskanta

Use Xor operation. Xor ing with 1 coverts a 0 to 1 and a 1
to zero...

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is data type long in c?

627


Can I initialize unions?

597


What is the advantage of a random access file?

642


How do we make a global variable accessible across files? Explain the extern keyword?

1426


What is a loop?

558






#include { printf("Hello"); } how compile time affects when we add additional header file .

1428


How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?

1594


What does printf does?

753


Can main () be called recursively?

633


Is c dynamically typed?

671


What is the use of linkage in c language?

619


A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream

671


An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode

611


Is flag a keyword in c?

682


How is a pointer variable declared?

596