Q18.webp
quanghoa92

Q18.webp

Question: 18
(Choose 1 answer)
Consider the following function:
int fun(int n)
{if(n==0)
return(1);
else
}
return(n + fun(n/2));
What is the output when the statement:
System.out.println(fun(9));
is run?
A. 18
B. 16
C. 17
D. 15

Thông tin

Category
CSD201
Thêm bởi
quanghoa92
Ngày thêm
Lượt xem
1,500
Lượt bình luận
4
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom