what is the purpose of the code, and is there any problem
with the code?
int f( int n, int l, int r )
{ return (n << l) >> r; }
Answer Posted / senthil
f returns (n * 2^(l-r))
n<<l => n * 2^l
(n<<l)>>r => (n * 2^l)/(2^r)=>(n * 2^(l-r))
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is a struct c#?
can any one provide me the notes of data structure for ignou cs-62 paper
Explain how can you avoid including a header more than once?
What is #line in c?
Write a code on reverse string and its complexity.
What is static identifier?
I need previous papers of CSC.......plz help out by posting them.......
How do you declare a variable that will hold string values?
Why header file is used in c?
Explain how can you determine the size of an allocated portion of memory?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.
Explain what does a function declared as pascal do differently?
Is c high or low level?
What is c definition?