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 / nila
d.computes compound interest for 1 year
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is static memory allocation?
What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.
Why does this code crash?
write a program to generate address labels using structures?
What is the purpose of the statement: strcat (S2, S1)?
When is a null pointer used?
Which control loop is recommended if you have to execute set of statements for fixed number of times?
Define recursion in c.
What are void pointers in c?
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
What is the size of enum in bytes?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
What is difference between union All statement and Union?
What is sizeof c?
Explain what is the general form of a c program?