...
Question 8946 – ISRO CS 2020
December 26, 2023
Question 8901 – ISRO CS 2020
December 26, 2023
Question 8946 – ISRO CS 2020
December 26, 2023
Question 8901 – ISRO CS 2020
December 26, 2023

Functions

Question 16
Consider the following recursive C function that takes two arguments

unsigned int rer ( unsigned int n, unsigned int r){

If (n > 0) return ( n%r + rer (n/r,r));

else return 0;

}

What is the return value of the function rer when it is called as rer (513, 2 )?
A
9
B
8
C
5
D
2
Question 16 Explanation: 
Given input function is rer(513, 2)
Condition: n>0

Sum of bits=2 if they given 513. It represented in binary.
Correct Answer: D
Question 16 Explanation: 
Given input function is rer(513, 2)
Condition: n>0

Sum of bits=2 if they given 513. It represented in binary.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!