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 does typedef struct mean?

661


When is a “switch” statement preferable over an “if” statement?

650


What is file in c language?

576


What are the types of data types and explain?

669


What does %d do in c?

545






Why array is used in c?

553


What is the sizeof () operator?

624


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

1424


Why is it usually a bad idea to use gets()? Suggest a workaround.

905


Is array a primitive data type in c?

579


Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

3056


An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array

688


What are the disadvantages of a shell structure?

693


the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

606


What are pointers? What are stacks and queues?

579