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
What is the purpose of ftell?
What is structure of c program?
What is the ANSI C Standard?
An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode
What are the 4 types of functions?
Does sprintf put null character?
Why string is used in c?
which type of aspect you want from the student.
What is character constants?
What is the return type of sizeof?
How do you construct an increment statement or decrement statement in C?
What does typeof return in c?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
how to print the character with maximum occurence and print that number of occurence too in a string given ?
FILE PROGRAMMING