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


Please Help Members By Posting Answers For Below Questions

What is a pointer on a pointer in c programming language?

623


What is c basic?

603


What are the benefits of c language?

650


Why is not a pointer null after calling free?

600


Differentiate between the expression “++a” and “a++”?

709






What is dynamic memory allocation?

812


What is C language ?

1533


How do you search data in a data file using random access method?

839


Should I learn c before c++?

624


What is the equivalent code of the following statement in WHILE LOOP format?

772


Explain what will the preprocessor do for a program?

607


What is a volatile keyword in c?

639


What are type modifiers in c?

625


How will you delete a node in DLL?

688


What are the types of pointers in c?

532