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
How can I find out how much free space is available on disk?
Is int a keyword in c?
What do you mean by a local block?
Can you write a programmer for FACTORIAL using recursion?
What are the types of arrays in c?
What is the most efficient way to count the number of bits which are set in an integer?
What is advantage of pointer in c?
What are the types of pointers in c?
How do you determine a file’s attributes?
shorting algorithmS
What are global variables and how do you declare them?
Explain what are binary trees?
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer