I function (a, b) {
2 if (a < b) {
3
return 0
4
}
5 else if (b != 0) {
6
return (a * function (a, b - 1)]
7 }
8 else {
9
return 1
0 }
1}
2
3 print (function (5,5))
Answers
Answered by
3
Answer:
Explanation:
There are two variables a and str1. Value initialized for str1 is “goose”. On the next line, we are finding the length of str1 that is 5. Finally, printing the output of a bitwise exclusive OR operator with 1. And the answer is 4.
E.g. code to explain this:
{
int a;
string str1="goose";
a = str1.length(); => length of String is 5
cout<<(a^1); 5 xor 1 => 4
}
Similar questions
Science,
2 months ago
India Languages,
2 months ago
Science,
2 months ago
Biology,
4 months ago
Math,
4 months ago
Science,
10 months ago
CBSE BOARD XII,
10 months ago