what does the following code do?
fn(int n,int p,int r)
{
static int a=p;
switch(n){
case 4:a+=a*r;
case 3:a+=a*r;
case 2:a+=a*r;
case 1:a+=a*r;
}
}
a.computes simple interest for one year
b.computes amount on compound interest for 1 to 4 years
c.computes simple interest for four year
d.computes compound interst for 1 year
Answer Posted / deepali
b
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Explain what is the difference between functions abs() and fabs()?
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
What is sizeof array?
Explain a pre-processor and its advantages.
What does the format %10.2 mean when included in a printf statement?
Explain what does the format %10.2 mean when included in a printf statement?
When would you use a pointer to a function?
Tell me when is a void pointer used?
What are the two types of functions in c?
What is operator precedence?
How will you find a duplicate number in a array without negating the nos ?
what is reason of your company position's in india no. 1.
Why pointers are used in c?
How to define structures? ·
Explain what is the difference between a free-standing and a hosted environment?