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
Where can I get an ansi-compatible lint?
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
What is the difference between scanf and fscanf?
What does c in a circle mean?
What are the advantage of c language?
I have seen function declarations that look like this
Is c easy to learn?
What is call by reference in functions?
What are the various types of control structures in programming?
What is #line?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
What is c method?
What kind of structure is a house?
What are enums in c?