Answer:
p(x,n)
1. if(n==0) [if power is 0]
2. then result =1.
3.else
4. { result=1.
5. for i=1 to n.
6. { result = result * x. } [each time we multiply x once]
7. return result.
8. }
Let's count p(3,3)
3
0, so come to else part.
i=1: result = result *3 = 3
i=2: result = result *3 = 9
i=2: result = result *3 = 27
Explanation:
here the for loop at step 4 takes O(n) time and other steps take constant time. So overall time complexity = O(n)
Answer:
In a function prototype the heading is followed by a semicolon, whereas in a function definition the heading is followed by a function block.
Explanation:
As the function prototype only declares the function and the function definition defines the operations in the function.
e.g:
add(int x, int y); is the prototype
add(int x, int y)
{
int sum;
sum
x
y;
} is the function definition.
Answer:
false
Explanation:
Select the comment icon. on the slide. The Comments pane will open and you can see comments for that slide.
Select Reply to respond to a comment.
Select the Next or Back buttons to go between comments and slides.
Answer:
functional
Explanation:
Suppose you are pivoting to a certain new company, and you find that your experience is not suited. You are certainly going to highlight your skills that are required for the job. And suppose you are lacking work experience, concerning the position you are opting for. Also, you have many gaps in employment. Then the best format suited to you is functional format.