Write a program to replace n bits from the position p of
the bit representation of an inputted character x with the
one's complement. Method invertBit takes 3 parameters x as
input character, p as position and n as the number of
positions from p. Replace n bits from pth position in 8 bit
character x. Then return the characters by inverting the
bits.


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

What is an example of structure?

0 Answers  


Why c is called object oriented language?

0 Answers  


Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?

0 Answers   Infosys,


How is actual parameter different from the formal parameter?

0 Answers  


how can i print "hello".please consider inverted commas as well.i want to print on console: "hello"

4 Answers   Wipro,






What is bin sh c?

0 Answers  


What is storage class?

0 Answers  


Subtract Two Number Without Using Subtraction Operator

0 Answers  


write a progam to compare the string using switch case?

1 Answers  


Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)

0 Answers  


hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...

0 Answers  


f1() { f(3);} f(int t) { switch(t); { case 2: c=3; case 3: c=4; case 4: c=5; case 5: c=6; default: c=0;} value of c?

5 Answers   Geometric Software,


Categories