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
What is a constant?
what do u mean by Direct access files? then can u explain about Direct Access Files?
In c programming language, how many parameters can be passed to a function ?
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
How do you declare a variable that will hold string values?
What is an identifier?
What is the difference between formatted&unformatted i/o functions?
What is the benefit of using an enum rather than a #define constant?
Write a program with dynamically allocation of variable.
What is volatile keyword in c?
Explain do array subscripts always start with zero?
Explain the array representation of a binary tree in C.
What is 'bus error'?
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
How do you list a file’s date and time?