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
Are pointers integer?
List some of the dynamic data structures in C?
Can stdout be forced to print somewhere other than the screen?
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
Is c high or low level?
What is wrong with this declaration?
If the size of int data type is two bytes, what is the range of signed int data type?
What is restrict keyword in c?
Is array name a pointer?
Can we change the value of static variable in c?
an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational
What does *p++ do?
How can you read a directory in a C program?
What is the purpose of & in scanf?
What is the maximum no. of arguments that can be given in a command line in C.?