Answer:
c. double triple(float n) { return (3 * n); }
Explanation:
In option a print is used to print integer.While printf is used in C to print something.
In option b there is no * operator between s s s it should be s*s*s.So it will give error.
In option d there is also no multiply operator * in between 3.14 2 r it should be 3.14*2*r.
So we can say that option c is error free.
Answer:
For values when n<32 use fb(n) else use fa(n).
See explaination for details
Explanation:
Earlier when n=1 fa(n)=2000 while fb(n)=2. for n=2 fa(n)=2000*22 =2000*4=8000 while fb(n)=2*24=2*16=32. It is observed that fa(n) requires more time than fb(n) for small values.
Now, we will see when fb(n) crosses fa(n). This can happen only when fb(n) values equals or greater than fa(n)
therefore,
2000n2<=2n4
Solving equation we get n2>=1000 which can happen when n>=32.
So for values when n<32 use fb(n) else use fa(n)
Answer:
The output is 28
Explanation:
Required
Determine the output of the code segment
The first line initializes "answer" to 0
The next two lines iterate through lists [2,4] and [3,5
Each of these lists have two elements; So, the number of iterations is 2 * 2 i.e. 4.
In the first iteration
numA = 2, numB = 3, answer = 0
So:

In the second iteration
numA = 2, numB = 5, answer = 5
So:

In the third iteration
numA = 4, numB = 3, answer = 12
So:

In the fourth iteration
numA = 4, numB = 5, answer = 19
So:

Lastly, the value of "answer" is printed
<em>Hence, the output is 28</em>
A check box is a user-interface (UI) component with two states; checked and unchecked.
Answer:
To be honest why would you want to enter one character. Anyways the answer is option 4