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

using for loop sum 2 number of any 4 digit number in c language

0 Answers  


What is c language used for?

0 Answers  


What is the scope of static variables in c language?

0 Answers  


What is pass by reference in functions?

0 Answers  


write a program to rearrange the array such way that all even elements should come first and next come odd

0 Answers  


code for reverse alternate words from astring

1 Answers   IBM,


What character terminates all strings composed of character arrays? 1) 0 2) . 3) END

3 Answers  


find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2

0 Answers   TCS,


Write a c program to build a heap method using Pointer to function and pointer to structure ?

0 Answers   Wipro,


How do you write a program which produces its own source code as its output?

2 Answers  


how can i make a program with this kind of output.. Enter a number: 5 0 01 012 0123 01234 012345 01234 0123 012 01 0

4 Answers   Wipro,


Does sprintf put null character?

0 Answers  


Categories