CopyBits(x,p,n,y)
copy n LSBs from y to x starting LSB at 'p'th position.

Answer Posted / yash

t =((~(~0<<n))<<p)
x = x & ~t;
y = y & t;
x=x|y;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is calloc in c?

671


Can you write a programmer for FACTORIAL using recursion?

620


Which is the memory area not included in C program? give the reason

1514


Write a code on reverse string and its complexity.

622


What is the use of gets and puts?

612






Where register variables are stored in c?

560


write a program to find out prime number using sieve case?

1648


Array is an lvalue or not?

648


What is a memory leak? How to avoid it?

587


What is openmp in c?

621


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

687


what is different between auto and local static? why should we use local static?

650


How to declare a variable?

579


What’s a signal? Explain what do I use signals for?

620


What is data structure in c and its types?

604