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 the purpose of & in scanf?
What is non linear data structure in c?
What is a nested loop?
Write a Program to find whether the given number or string is palindrome.
What do you mean by c what are the main characteristics of c language?
What is quick sort in c?
Explain About fork()?
Is fortran still used in 2018?
How can I change their mode to binary?
Is c still relevant?
Do you have any idea about the use of "auto" keyword?
What is null pointer constant?
What are the types of variables in c?
What is typedef?
Can you please explain the difference between syntax vs logical error?