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 / eswaran
initializer is a constant value..so its not possible to
change the value at run time..
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain how do you determine the length of a string value that was stored in a variable?
What is the process of writing the null pointer?
Explain what are global variables and explain how do you declare them?
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
Who developed c language?
What is memory leak in c?
Write a Program to find whether the given number or string is palindrome.
how to create duplicate link list using C???
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
Who invented bcpl language?
What are the types of variables in c?
What are header files? What are their uses?
Does c have function or method?
write a progrmm in c language take user interface generate table using for loop?
How do you convert strings to numbers in C?